From 956395a529f3f930a3365ff8d36408be0dfc207b Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Fri, 26 Oct 2018 12:31:39 +0100 Subject: ci: fail if requested test name is not found --- ci/test.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ci/test.sh b/ci/test.sh index fea9d82d7..121196819 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -44,6 +44,12 @@ failure() { # JUnit-style XML files. run_test() { TEST_CMD=$(ctest -N -V -R "^${1}$" | sed -n 's/^[0-9]*: Test command: //p') + + if [ -z "$TEST_CMD" ]; then + echo "Could not find tests: $1" + exit 1 + fi + TEST_CMD="${TEST_CMD} -r${BUILD_DIR}/results_${1}.xml" if [ "$LEAK_CHECK" = "valgrind" ]; then -- cgit v1.2.1