diff --git a/Makefile b/Makefile index b10b7880a..d7f6f37c4 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ test: build/test/Makefile # Runs all test cases run-tests: test - (cd build/${BUILDTYPE} && exec find . -maxdepth 1 -name "test_*" -exec {} \;) + BUILDTYPE=$(BUILDTYPE) ./scripts/run_tests.sh test/%: build/test/Makefile $(MAKE) -C build/test BUILDTYPE=$(BUILDTYPE) V=$(V) $* diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh new file mode 100755 index 000000000..3d0c0bdd9 --- /dev/null +++ b/scripts/run_tests.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail + +cd build/$BUILDTYPE + +for TEST in test_* ; do + ./$TEST +done