Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-10-18 20:57:18 +0200
committerMartin Hořeňovský2022-10-20 21:34:32 +0200
commit9d0868984506f53f084e877f392ef6ceed796283 (patch)
treea1e30918766f744924c9fbdbe7d5c785afd6b8c7 /tests
parentafc017ef52c17f1b9aae7a5ed2be92494dd94e45 (diff)
downloadcatch3-9d0868984506f53f084e877f392ef6ceed796283.tar.gz
Add support for Bazel's TESTBRIDGE_TEST_ONLY env var
Closes #2490
Diffstat (limited to 'tests')
-rw-r--r--tests/ExtraTests/CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ExtraTests/CMakeLists.txt b/tests/ExtraTests/CMakeLists.txt
index 0943a9c3..780f2559 100644
--- a/tests/ExtraTests/CMakeLists.txt
+++ b/tests/ExtraTests/CMakeLists.txt
@@ -150,6 +150,17 @@ set_tests_properties(NO_CATCH_CONFIG_BAZEL_REPORTER-1
ENVIRONMENT "BAZEL_TEST=1"
)
+add_test(NAME BazelEnv::TESTBRIDGE_TEST_ONLY
+ COMMAND
+ $<TARGET_FILE:BazelReporterNoCatchConfig>
+)
+set_tests_properties(BazelEnv::TESTBRIDGE_TEST_ONLY
+ PROPERTIES
+ ENVIRONMENT "BAZEL_TEST=1;TESTBRIDGE_TEST_ONLY=Passing test case"
+ PASS_REGULAR_EXPRESSION "All tests passed \\(1 assertion in 1 test case\\)"
+)
+
+
# The default handler on Windows leads to the just-in-time debugger firing,
# which makes this test unsuitable for CI and headless runs, as it opens
# up an interactive dialog.