diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2018-09-10 12:27:24 +0100 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2018-10-26 13:52:47 +0200 |
commit | 4df0991552eacecde02d0c6324570c548e7569ff (patch) | |
tree | 0e526a4c765728283d8a82eac5a1ca650d289f54 | |
parent | 2c0f905387c8780ce02c5f8f020a681a217afd58 (diff) | |
download | libgit2-4df0991552eacecde02d0c6324570c548e7569ff.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.
(cherry picked from commit 7e353b7a140dade32f1f1db6afd1721cf2c18a4a)
-rwxr-xr-x | ci/test.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ci/test.sh b/ci/test.sh index 28f76029a..e162a4469 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" |