Skip to content

Commit f22521e

Browse files
committed
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.
1 parent 05c51bb commit f22521e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ci/test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ failure() {
4444
# JUnit-style XML files.
4545
run_test() {
4646
TEST_CMD=$(ctest -N -V -R "^${1}$" | sed -n 's/^[0-9]*: Test command: //p')
47+
48+
if [ -z "$TEST_CMD" ]; then
49+
echo "Could not find tests: $1"
50+
exit 1
51+
fi
52+
4753
TEST_CMD="${TEST_CMD} -r${BUILD_DIR}/results_${1}.xml"
4854

4955
if [ "$LEAK_CHECK" = "valgrind" ]; then

0 commit comments

Comments
 (0)