From 748ac3e1aa2656af246b931564f42e2458b7b6d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Tue, 8 Jul 2014 10:33:03 -0700 Subject: [PATCH] fail when there are test errors [skip ci] --- Makefile | 2 +- scripts/run_tests.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 scripts/run_tests.sh 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