summaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-10-26 12:31:39 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2018-10-26 14:40:09 +0100
commitf22521efe2074a2a4c2764eeaa68c23af50e7fcb (patch)
treee320d3ca92f10f7f0dd2cd6b0fc079713982f539 /ci
parent05c51bb6ea02e64fe85aa0a56abef6e39c6546a5 (diff)
downloadlibgit2-f22521efe2074a2a4c2764eeaa68c23af50e7fcb.tar.gz
ci: fail if requested test name is not found (unix)
POSIX: the CMakeLists.txt configures the test names; when we query ctest for the test command-line to run, fail if the tests are not found.
Diffstat (limited to 'ci')
-rwxr-xr-xci/test.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/ci/test.sh b/ci/test.sh
index 5d7c913c8..1bc710a73 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