From ece7c044b3796d5b4f375eac15f890a9cb725b89 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 18 Jan 2017 15:46:55 +0100 Subject: [PATCH 01/11] 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 From 06a1b2307f827d13468539638f0ccf10c58f5d4f Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 18 Jan 2017 15:52:26 +0100 Subject: [PATCH 02/11] remove obsolete dependency --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 8b4cbcf8e..d043e0ce8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -196,7 +196,7 @@ examples: PROFILING_CFLAGS="$(PROFILING_CFLAGS)" \ PROFILING_LDFLAGS="$(PROFILING_LDFLAGS)" -C usr examples -test: demo +test: . ./test.sh qemu: From cd10edcd0aee39ebb42209d938570e7e851d22f8 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 18 Jan 2017 16:17:28 +0100 Subject: [PATCH 03/11] remove typos --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 81f37c10f..64405d8dd 100644 --- a/test.sh +++ b/test.sh @@ -6,7 +6,7 @@ FILES="usr/tests/hello usr/tests/hellof usr/tests/hello++ usr/tests/thr_hello usr/tests/pi usr/benchmarks/stream usr/benchmarks/basic" PROXY=/opt/hermit/bin/proxy -if [ "$TRAVIS_BRANCH" = "prodcution" ] +if [ $TRAVIS_BRANCH = "prodcution" ] then echo "No tests on production branch" else From 093aed7ae7107bcffe62613d143532b5b2ad4a3b Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 18 Jan 2017 16:23:54 +0100 Subject: [PATCH 04/11] remove typo --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 64405d8dd..7ad3f99bd 100644 --- a/test.sh +++ b/test.sh @@ -6,7 +6,7 @@ FILES="usr/tests/hello usr/tests/hellof usr/tests/hello++ usr/tests/thr_hello usr/tests/pi usr/benchmarks/stream usr/benchmarks/basic" PROXY=/opt/hermit/bin/proxy -if [ $TRAVIS_BRANCH = "prodcution" ] +if [ $TRAVIS_BRANCH == "prodcution" ] then echo "No tests on production branch" else From 4ffd44071126846e3700e89257db4fbd63e00298 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 18 Jan 2017 16:35:04 +0100 Subject: [PATCH 05/11] remove typo --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 7ad3f99bd..4121404de 100644 --- a/test.sh +++ b/test.sh @@ -6,7 +6,7 @@ FILES="usr/tests/hello usr/tests/hellof usr/tests/hello++ usr/tests/thr_hello usr/tests/pi usr/benchmarks/stream usr/benchmarks/basic" PROXY=/opt/hermit/bin/proxy -if [ $TRAVIS_BRANCH == "prodcution" ] +if [ $TRAVIS_BRANCH == "production" ] then echo "No tests on production branch" else From 5e89d6ce73d4711ded86db6a82feb36cf785421d Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 18 Jan 2017 17:19:28 +0100 Subject: [PATCH 06/11] add missing double-quotes --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 4121404de..5f69f3e19 100644 --- a/test.sh +++ b/test.sh @@ -6,7 +6,7 @@ FILES="usr/tests/hello usr/tests/hellof usr/tests/hello++ usr/tests/thr_hello usr/tests/pi usr/benchmarks/stream usr/benchmarks/basic" PROXY=/opt/hermit/bin/proxy -if [ $TRAVIS_BRANCH == "production" ] +if [ "$TRAVIS_BRANCH" == "production" ] then echo "No tests on production branch" else From 6299bf607380be5da99c537596729df854065c91 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 18 Jan 2017 17:43:10 +0100 Subject: [PATCH 07/11] add some debug messages --- test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 5f69f3e19..cef7bb6c9 100644 --- a/test.sh +++ b/test.sh @@ -5,8 +5,12 @@ FILES="usr/tests/hello usr/tests/hellof usr/tests/hello++ usr/tests/thr_hello usr/tests/pi usr/benchmarks/stream usr/benchmarks/basic" PROXY=/opt/hermit/bin/proxy +BRANCH="production" -if [ "$TRAVIS_BRANCH" == "production" ] +echo $TRAVIS_BRANCH +echo $BRANCH + +if [ "$TRAVIS_BRANCH" == "$BRANCH" ] then echo "No tests on production branch" else From 6b105496a814653dc2aa49bb1723d637eeb2a884 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 18 Jan 2017 18:01:19 +0100 Subject: [PATCH 08/11] add missing ; --- test.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test.sh b/test.sh index cef7bb6c9..256f9f071 100644 --- a/test.sh +++ b/test.sh @@ -10,8 +10,7 @@ BRANCH="production" echo $TRAVIS_BRANCH echo $BRANCH -if [ "$TRAVIS_BRANCH" == "$BRANCH" ] -then +if [ "$TRAVIS_BRANCH" == "$BRANCH" ]; then echo "No tests on production branch" else for f in $FILES; do echo "check $f..."; $PROXY $f || exit 1; done From e0163855286276bf12f94502193c083c50976b14 Mon Sep 17 00:00:00 2001 From: Jens Breitbart Date: Wed, 18 Jan 2017 21:11:24 +0100 Subject: [PATCH 09/11] Added travis_retry. --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 09db44bc9..e3c0a72a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,10 +6,10 @@ language: c compiler: gcc before_install: - echo "deb https://dl.bintray.com/rwth-os/hermitcore vivid main" | sudo tee -a /etc/apt/sources.list - - sudo apt-get -qq update - - sudo apt-get install -y curl qemu-system-x86 nasm texinfo libmpfr-dev libmpc-dev libgmp-dev libisl-dev flex bison packaging-dev + - travis_retry sudo apt-get -qq update + - travis_retry sudo apt-get install -y curl qemu-system-x86 nasm texinfo libmpfr-dev libmpc-dev libgmp-dev libisl-dev flex bison packaging-dev #- sudo apt-get install -y --force-yes binutils-hermit gcc-hermit-bootstrap - - sudo apt-get install -y --force-yes binutils-hermit libhermit newlib-hermit pthread-embedded-hermit gcc-hermit + - travis_retry sudo apt-get install -y --force-yes binutils-hermit libhermit newlib-hermit pthread-embedded-hermit gcc-hermit - git submodule update --init lwip usr/libomp script: From d368f9ca60d0b74589d0330d3df8f42190b5daae Mon Sep 17 00:00:00 2001 From: Jens Breitbart Date: Wed, 18 Jan 2017 21:31:49 +0100 Subject: [PATCH 10/11] Disabled test for production. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e3c0a72a9..8c49ccdb4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ script: - debuild -e PATH -us -uc -j2 - sudo dpkg -i ../libhermit*_amd64.deb - make -j2 examples - - make test + - if [ "$TRAVIS_BRANCH" != "production" ]; then make test; fi deploy: on: production From cdd4313a2ccc5b763b6ffda2938e39b8b9290ff6 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Wed, 18 Jan 2017 22:50:01 +0100 Subject: [PATCH 11/11] remove workarounds --- test.sh | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/test.sh b/test.sh index 256f9f071..c29469b81 100644 --- a/test.sh +++ b/test.sh @@ -5,22 +5,14 @@ FILES="usr/tests/hello usr/tests/hellof usr/tests/hello++ usr/tests/thr_hello usr/tests/pi usr/benchmarks/stream usr/benchmarks/basic" PROXY=/opt/hermit/bin/proxy -BRANCH="production" -echo $TRAVIS_BRANCH -echo $BRANCH +for f in $FILES; do echo "check $f..."; $PROXY $f || exit 1; done -if [ "$TRAVIS_BRANCH" == "$BRANCH" ]; 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 $! -fi +# kill server +#kill $!