Commit 4df09915 by Edward Thomson Committed by Patrick Steinhardt

ci: only run the exact named test

Our CI test system invokes ctest with the name of the given tests it
wishes to invoke.  ctest (with the `-R` flag) treats this name as a
regular expression.  Provide anchors in the regular expression to avoid
matching additional tests in this search.

(cherry picked from commit 7e353b7a)
parent 2c0f9053
...@@ -41,7 +41,7 @@ die() { ...@@ -41,7 +41,7 @@ die() {
# test configuration in a single place (tests/CMakeLists.txt) instead of running clar # test configuration in a single place (tests/CMakeLists.txt) instead of running clar
# here as well. But it allows us to wrap our test harness with a leak checker like valgrind. # here as well. But it allows us to wrap our test harness with a leak checker like valgrind.
run_test() { run_test() {
TEST_CMD=$(ctest -N -V -R $1 | sed -n 's/^[0-9]*: Test command: //p') TEST_CMD=$(ctest -N -V -R "^${1}$" | sed -n 's/^[0-9]*: Test command: //p')
if [ "$LEAK_CHECK" = "valgrind" ]; then if [ "$LEAK_CHECK" = "valgrind" ]; then
RUNNER="$VALGRIND $TEST_CMD" RUNNER="$VALGRIND $TEST_CMD"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment