From e7baaea9d72d4b39d9f6ee4142d37ed2cbcd22fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Mon, 18 Jan 2016 11:29:44 +0100 Subject: Add a script to run selected tests. --- test/run_test.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 test/run_test.sh diff --git a/test/run_test.sh b/test/run_test.sh new file mode 100755 index 0000000..da293c0 --- /dev/null +++ b/test/run_test.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# This is a script to faciliate running single tests. +# +# Usage: ./run_test.sh ... +# If no test string is passed then all tests are run. + +test_dir=$(dirname $0) +cd $test_dir + +if [[ $# == 0 ]] +then + echo "======================" + echo "All tests are now run." + echo "======================" + make -C .. check +else + for TST in "$@" + do + echo "=========================" + echo "The $TST test is now run." + echo "=========================" + rm -f $TST*.o; make $TST && (./$TST; RES=$?; echo; echo "Result: $RES"; cat result_$TST.xml) + done +fi -- cgit v1.2.3