aboutsummaryrefslogtreecommitdiff
path: root/src/tests/ktests/run_qemu_test.sh
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-02-14 19:15:43 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2015-02-14 19:15:43 +0100
commit1ca147f9e08202dfbc78692e204adac280f8238b (patch)
tree70cf40c14aae874bae814a9dcddbfdf5aba52079 /src/tests/ktests/run_qemu_test.sh
parent74ea640f40285220dfa93492a143a35426b867d1 (diff)
downloadkogata-1ca147f9e08202dfbc78692e204adac280f8238b.tar.gz
kogata-1ca147f9e08202dfbc78692e204adac280f8238b.zip
Rearrange testing architecture : just type 'make run_tests'
Diffstat (limited to 'src/tests/ktests/run_qemu_test.sh')
-rwxr-xr-xsrc/tests/ktests/run_qemu_test.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tests/ktests/run_qemu_test.sh b/src/tests/ktests/run_qemu_test.sh
new file mode 100755
index 0000000..93c7320
--- /dev/null
+++ b/src/tests/ktests/run_qemu_test.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+(qemu-system-i386 -kernel test_kernel.bin -serial stdio -m 16 -display none & echo $! >&3) 3>pid \
+ | tee >(grep -m 1 "TEST-" >result; kill -INT `cat pid`) \
+
+RESULT=`cat result`
+
+rm result
+rm pid
+
+if [ $RESULT != '(TEST-OK)' ]; then exit 1; fi
+