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

36 lines
1.3 KiB
Bash
Raw Permalink Normal View History

#!/bin/bash
#
# do not use this script
# it is written only for internal tests via Travis CI
2017-05-21 00:05:42 +02:00
TDIR=build/local_prefix/opt/hermit/x86_64-hermit/extra
2017-11-10 22:23:01 +01:00
FILES="$TDIR/tests/hello $TDIR/tests/hellof $TDIR/tests/hello++ $TDIR/tests/thr_hello $TDIR/tests/pi $TDIR/benchmarks/stream $TDIR/benchmarks/basic $TDIR/tests/signals $TDIR/tests/test-malloc $TDIR/tests/test-malloc-mt $TDIR/tests/argv_envp"
2017-05-21 00:05:42 +02:00
PROXY=build/local_prefix/opt/hermit/bin/proxy
2017-05-21 00:21:47 +02:00
for f in $FILES; do echo "check $f..."; HERMIT_ISLE=qemu HERMIT_CPUS=1 HERMIT_KVM=0 HERMIT_VERBOSE=1 timeout --kill-after=5m 5m $PROXY $f || exit 1; done
2017-01-18 17:43:10 +01:00
2017-08-04 10:12:52 +02:00
for f in $FILES; do echo "check $f..."; HERMIT_ISLE=qemu HERMIT_CPUS=2 HERMIT_KVM=0 HERMIT_VERBOSE=1 timeout --kill-after=5m 5m $PROXY $f || exit 1; done
2017-01-18 22:50:01 +01:00
# test echo server at port 8000
2017-05-24 22:57:18 +02:00
HERMIT_ISLE=qemu HERMIT_CPUS=1 HERMIT_KVM=0 HERMIT_VERBOSE=1 HERMIT_APP_PORT=8000 $PROXY $TDIR/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-05-24 22:57:18 +02:00
kill $!
2017-11-21 22:56:48 +01:00
# test connection via netio
wget http://web.ars.de/wp-content/uploads/2017/04/netio132.zip
unzip netio132.zip
2017-11-21 23:39:38 +01:00
HERMIT_ISLE=qemu HERMIT_CPUS=2 HERMIT_KVM=0 HERMIT_VERBOSE=1 HERMIT_APP_PORT=18767 $PROXY $TDIR/benchmarks/netio &
2017-11-21 22:56:48 +01:00
sleep 1
2017-11-21 23:16:45 +01:00
chmod a+rx bin/linux-x86_64
2017-11-22 15:34:21 +01:00
bin/linux-x86_64 -t -b 4k localhost
2017-11-21 22:56:48 +01:00
sleep 1
# kill server
kill $!