summaryrefslogtreecommitdiffstats
path: root/test/hello_world
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2016-07-12 18:59:27 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-07-12 19:18:28 +1000
commit2ceb8b8c0ac53a9014e83d12e1c758d5f9e07fe6 (patch)
treea279bac9a77c903c7c1cd2bf2abc87d6a2d856c1 /test/hello_world
parent68b4d66bdad8bc036073d1a4cbc26e94cdaf908a (diff)
downloadtalos-skiboot-2ceb8b8c0ac53a9014e83d12e1c758d5f9e07fe6.tar.gz
talos-skiboot-2ceb8b8c0ac53a9014e83d12e1c758d5f9e07fe6.zip
make check: make test runs less noisy
Run a small wrapper around some unit tests with the QTEST makefile macro (QTEST=Quiet TEST). Also, wrap boot tests in mambo and qemu to be quiet by default. Both ./test/run.sh and the modified mambo/qemu test runner scripts output full stdout and stderr in the event of error. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'test/hello_world')
-rwxr-xr-xtest/hello_world/run_mambo_hello_world.sh16
-rwxr-xr-xtest/hello_world/run_qemu_hello_world.sh16
2 files changed, 30 insertions, 2 deletions
diff --git a/test/hello_world/run_mambo_hello_world.sh b/test/hello_world/run_mambo_hello_world.sh
index ba28a216..1589bd03 100755
--- a/test/hello_world/run_mambo_hello_world.sh
+++ b/test/hello_world/run_mambo_hello_world.sh
@@ -31,6 +31,10 @@ export SKIBOOT_ZIMAGE=`pwd`/test/hello_world/hello_kernel/hello_kernel
OLD_ULIMIT_C=`ulimit -c`
ulimit -c 0
+t=$(tempfile) || exit 1
+
+trap "rm -f -- '$t'" EXIT
+
( cd external/mambo;
cat <<EOF | expect
set timeout 30
@@ -43,7 +47,17 @@ eof { send_user "\nUnexpected EOF\n;" exit 1 }
wait
exit 0
EOF
-)
+) 2>&1 > $t
+
+r=$?
+if [ $r != 0 ]; then
+ cat $t
+ exit $r
+fi
+
ulimit -c $OLD_ULIMIT_C
+
echo
+rm -f -- "$t"
+trap - EXIT
exit 0;
diff --git a/test/hello_world/run_qemu_hello_world.sh b/test/hello_world/run_qemu_hello_world.sh
index 32921785..9a85b3d7 100755
--- a/test/hello_world/run_qemu_hello_world.sh
+++ b/test/hello_world/run_qemu_hello_world.sh
@@ -27,6 +27,9 @@ fi
export SKIBOOT_ZIMAGE=`pwd`/test/hello_world/hello_kernel/hello_kernel
+t=$(tempfile) || exit 1
+
+trap "rm -f -- '$t'" EXIT
(
cat <<EOF | expect
@@ -41,5 +44,16 @@ close
wait
exit 0
EOF
-)
+) 2>&1 > $t
+
+r=$?
+if [ $r != 0 ]; then
+ cat $t
+ exit $r
+fi
+
+echo
+rm -f -- "$t"
+trap - EXIT
+
exit 0;
OpenPOWER on IntegriCloud