Add support for Bazel's TESTBRIDGE_TEST_ONLY env var

Closes #2490
This commit is contained in:
Martin Hořeňovský
2022-10-18 20:57:18 +02:00
parent afc017ef52
commit 9d08689845
3 changed files with 65 additions and 34 deletions

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.