Add support for Bazel's TESTBRIDGE_TEST_ONLY env var

Closes #2490
This commit is contained in:
Martin Hořeňovský committed 2022-10-20 21:34:32 +02:00
1 parent afc017ef52
commit 9d08689845
3 files changed
+65 -34

No files matched your search

+11
View File
@@ -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.