diff --git a/.travis.yml b/.travis.yml index 42cc1fdc7a..73d0e8be3d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,6 @@ before_script: script: - make - - cd $TRAVIS_BUILD_DIR/Pal/regression && make regression - - cd $TRAVIS_BUILD_DIR/LibOS/shim/test/regression && make regression - - cd $TRAVIS_BUILD_DIR/LibOS/shim/test/apps/ltp && make regression - cd $TRAVIS_BUILD_DIR/Pal/src && make clean && make SGX=1 - cd $TRAVIS_BUILD_DIR/Pal/src && make clean && make DEBUG=1 - cd $TRAVIS_BUILD_DIR/Pal/src && make clean && make SGX=1 DEBUG=1 diff --git a/Jenkinsfiles/Jenkinsfile b/Jenkinsfiles/Linux similarity index 98% rename from Jenkinsfiles/Jenkinsfile rename to Jenkinsfiles/Linux index d23ee0692d..741bf763e6 100644 --- a/Jenkinsfiles/Jenkinsfile +++ b/Jenkinsfiles/Linux @@ -4,7 +4,7 @@ pipeline { stage('Build') { steps { sh ''' - make + make clean && make ''' } } diff --git a/Jenkinsfiles/Linux-Debug b/Jenkinsfiles/Linux-Debug new file mode 100644 index 0000000000..022b43f3c0 --- /dev/null +++ b/Jenkinsfiles/Linux-Debug @@ -0,0 +1,70 @@ +pipeline { + agent any + stages { + stage('Build') { + steps { + sh ''' + make clean && make DEBUG=1 + ''' + } + } + stage('Test') { + steps { + sh ''' + cd LibOS/shim/test/apps/gcc + make regression + ''' + sh ''' + cd LibOS/shim/test/apps/lmbench + make regression + ''' + sh ''' + cd LibOS/shim/test/apps/python + make regression + ''' + sh ''' + cd LibOS/shim/test/apps/lighttpd + make + make start-graphene-server & + ./benchmark-http.sh 127.0.0.1:8000 + ''' + sh ''' + cd LibOS/shim/test/apps/apache + make + make start-graphene-server & + ./benchmark-http.sh 127.0.0.1:8000 + ''' + sh ''' + cd Pal/regression + make regression + ''' + sh ''' + cd LibOS/shim/test/regression + make regression + ''' + sh ''' + cd LibOS/shim/test/apps/ltp + make + ./syscalls.sh + ''' + } + } + stage('Deploy') { + steps { + sh 'echo Deploying code' + } + } + } + post { + success { + echo 'Deployment successful' + } + failure { + echo 'Failure while on the pipeline' + } + unstable { + echo 'Pipeline marked as "unstable"' + } + } +} + diff --git a/LibOS/shim/test/apps/gcc/.gitignore b/LibOS/shim/test/apps/gcc/.gitignore new file mode 100644 index 0000000000..932f77fbdb --- /dev/null +++ b/LibOS/shim/test/apps/gcc/.gitignore @@ -0,0 +1,3 @@ +bzip2 +gzip +hello diff --git a/LibOS/shim/test/apps/lighttpd/.gitignore b/LibOS/shim/test/apps/lighttpd/.gitignore index 55f53d51d3..5b9876b7f2 100644 --- a/LibOS/shim/test/apps/lighttpd/.gitignore +++ b/LibOS/shim/test/apps/lighttpd/.gitignore @@ -1,2 +1,8 @@ ab.* result-* +OUTPUT +build +html +lighttpd-* +lighttpd.conf + diff --git a/LibOS/shim/test/apps/lmbench/.gitignore b/LibOS/shim/test/apps/lmbench/.gitignore new file mode 100644 index 0000000000..1dee5174db --- /dev/null +++ b/LibOS/shim/test/apps/lmbench/.gitignore @@ -0,0 +1 @@ +lmbench-2.5/bin diff --git a/LibOS/shim/test/apps/python/.gitignore b/LibOS/shim/test/apps/python/.gitignore index 0d20b6487c..da3efc7f04 100644 --- a/LibOS/shim/test/apps/python/.gitignore +++ b/LibOS/shim/test/apps/python/.gitignore @@ -1 +1,2 @@ *.pyc +benchmarks diff --git a/LibOS/shim/test/apps/python/Makefile b/LibOS/shim/test/apps/python/Makefile index c3921dead2..455fb4efe3 100644 --- a/LibOS/shim/test/apps/python/Makefile +++ b/LibOS/shim/test/apps/python/Makefile @@ -26,7 +26,7 @@ $(PYTHON_SRC)/configure: $(PYTHON_SRC).tgz benchmarks: benchmarks.tar.gz tar -xzf $< -regression: +regression: @echo "\n\nBuilding Python..." @$(MAKE) >> /dev/null 2>&1 @@ -40,15 +40,7 @@ regression: -grep -q "fib2 55" OUTPUT @rm -f OUTPUT - @echo "\n\nRun a HTTP server in the background" - python scripts/dummy-web-server.py 8000 & echo $$! > server.PID - sleep 1 - @echo "\n\nRun test-http.py:" - -./python.manifest scripts/test-http.py 127.0.0.1 8000 > OUTPUT1 - -wget -q http://127.0.0.1:8000/ -O OUTPUT2 - -diff -q OUTPUT1 OUTPUT2 - @kill `cat server.PID` - @rm -f OUTPUT1 OUTPUT2 server.PID + ./web-test.sh BENCHMARK = all,-rietveld,-spitfire,-tornado_http diff --git a/LibOS/shim/test/apps/python/web-test.sh b/LibOS/shim/test/apps/python/web-test.sh new file mode 100755 index 0000000000..b79314fb59 --- /dev/null +++ b/LibOS/shim/test/apps/python/web-test.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +## We really need to pick a unique ephemeral port; start by just picking pid+1024 +PORT=$(($$ + 1024)) + +echo "\n\nRun a HTTP server in the background on port " + $PORT +python scripts/dummy-web-server.py $PORT & echo $! > server.PID +sleep 1 +echo "\n\nRun test-http.py:" +./python.manifest scripts/test-http.py 127.0.0.1 $PORT > OUTPUT1 +wget -q http://127.0.0.1:$PORT/ -O OUTPUT2 +diff -q OUTPUT1 OUTPUT2 +kill `cat server.PID` +rm -f OUTPUT1 OUTPUT2 server.PID diff --git a/Pal/regression/Process.manifest.template b/Pal/regression/Process.manifest.template new file mode 100644 index 0000000000..c31a7cd540 --- /dev/null +++ b/Pal/regression/Process.manifest.template @@ -0,0 +1,15 @@ +# the executable to run +# loader.exec = file:./HelloWorld + +# debug type: inline|file +loader.debug_type = inline + +# debug as file +# loader.debug_file = + +fs.mount.root.uri = file: + +# allow to bind on port 8000 +net.allow_bind.1 = 127.0.0.1:8000 +# allow to connect to port 8000 +net.allow_peer.1 = 127.0.0.1:8000