1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

add http server test

This commit is contained in:
Stefan Lankes 2017-02-20 22:46:00 +01:00
parent 1432f458f8
commit 797e26d8a3

14
test.sh
View file

@ -6,13 +6,15 @@
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
for f in $FILES; do echo "check $f..."; timeout --kill-after=3m 3m $PROXY $f || exit 1; done
for f in $FILES; do echo "check $f..."; timeout --kill-after=5m 5m $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
HERMIT_APP_PORT=8000 $PROXY usr/tests/server &
sleep 10
curl http://127.0.0.1:8000/help
sleep 1
curl http://127.0.0.1:8000/hello
sleep 1
# kill server
#kill $!
kill $!