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

21 lines
562 B
Bash
Raw Permalink Normal View History

#!/bin/bash
#
# do not use this script
# 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 usr/tests/signals"
2017-01-18 15:46:55 +01:00
PROXY=/opt/hermit/bin/proxy
2017-02-20 22:46:00 +01:00
for f in $FILES; do echo "check $f..."; timeout --kill-after=5m 5m $PROXY $f || exit 1; done
2017-01-18 17:43:10 +01:00
2017-01-18 22:50:01 +01:00
# test echo server at port 8000
2017-02-20 22:46:00 +01:00
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
2016-09-21 23:09:41 +02:00
2017-01-18 22:50:01 +01:00
# kill server
2017-02-20 22:46:00 +01:00
kill $!