From ece7c044b3796d5b4f375eac15f890a9cb725b89 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 18 Jan 2017 15:46:55 +0100 Subject: [PATCH] add test cases for Travis CI --- .travis.yml | 1 + test.sh | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7619680c2..09db44bc9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,7 @@ script: - debuild -e PATH -us -uc -j2 - sudo dpkg -i ../libhermit*_amd64.deb - make -j2 examples + - make test deploy: on: production diff --git a/test.sh b/test.sh index 4409b3da7..81f37c10f 100644 --- a/test.sh +++ b/test.sh @@ -4,15 +4,20 @@ # it is written only for internal tests via Travis CI FILES="usr/tests/hello usr/tests/hellof usr/tests/hello++ usr/tests/thr_hello usr/tests/pi usr/benchmarks/stream usr/benchmarks/basic" -PROXY=tools/proxy +PROXY=/opt/hermit/bin/proxy -for f in $FILES; do echo "check $f..."; $PROXY $f || exit 1; done +if [ "$TRAVIS_BRANCH" = "prodcution" ] +then + echo "No tests on production branch" +else + for f in $FILES; do echo "check $f..."; $PROXY $f || exit 1; done -# test echo server at port 8000 -#HERMIT_APP_PORT=8000 $PROXY usr/tests/server & -#sleep 10 -#curl http://127.0.0.1:8000/help -#sleep 1 + # test echo server at port 8000 + #HERMIT_APP_PORT=8000 $PROXY usr/tests/server & + #sleep 10 + #curl http://127.0.0.1:8000/help + #sleep 1 -# kill server -#kill $! + # kill server + #kill $! +fi