diff options
| author | André Nusser <andre.nusser@googlemail.com> | 2016-01-18 11:29:44 +0100 | 
|---|---|---|
| committer | André Nusser <andre.nusser@googlemail.com> | 2016-01-18 11:29:44 +0100 | 
| commit | e7baaea9d72d4b39d9f6ee4142d37ed2cbcd22fe (patch) | |
| tree | e618f0ed0b4bbaabc234b510a505b078d60e667e /test | |
| parent | 88052c9d3dbe22c5ce16ea03dadd00d85ee03b56 (diff) | |
Add a script to run selected tests.
Diffstat (limited to 'test')
| -rwxr-xr-x | test/run_test.sh | 24 | 
1 files changed, 24 insertions, 0 deletions
| 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 <test_1> <test_2> ... <test_n> +# 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 | 
