summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-09-10 12:27:24 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2018-09-10 12:27:24 +0100
commit7e353b7a140dade32f1f1db6afd1721cf2c18a4a (patch)
tree833dbc09857415efe392068dd9b1fcce2913ef0b
parentbc34cb63ff5b2bc51bcdec7dfc41202dfc34e97f (diff)
downloadlibgit2-7e353b7a140dade32f1f1db6afd1721cf2c18a4a.tar.gz
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.
-rwxr-xr-xci/test.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/ci/test.sh b/ci/test.sh
index a9a853720..23b5efb3c 100755
--- a/ci/test.sh
+++ b/ci/test.sh
@@ -41,7 +41,7 @@ die() {
# 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.
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
RUNNER="$VALGRIND $TEST_CMD"