From 53933f6705991f8fca7ffd01e95213f1d2044c1f Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 16 Nov 2014 11:34:16 +0100 Subject: [PATCH] Exit with error code when integration tests fail --- test/run.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/run.sh b/test/run.sh index 7455e5079..5fb4431f5 100755 --- a/test/run.sh +++ b/test/run.sh @@ -84,8 +84,19 @@ fi echo "testfiles: $testfiles" +failed="" for testfile in "$testfiles"; do current=$(basename "${testfile}" .sh) - bash "${testfile}" && pass "${current} pass" || err "${current} failed!" + if bash "${testfile}"; then + pass "${current} pass" + else + err "${current} failed!" + failed+=" ${current}" + fi done + +if [ -n "$failed" ]; then + err "failed tests: ${failed}" + exit 1 +fi