Change Bazel XML support to depend upon BAZEL_TEST

This commit is contained in:
Brandon Jones
2022-06-14 10:56:19 +01:00
committed by Martin Hořeňovský
parent 078201fcf4
commit 7e4ec432d0
4 changed files with 64 additions and 18 deletions

View File

@@ -137,6 +137,18 @@ set_tests_properties(CATCH_CONFIG_BAZEL_REPORTER-1
LABELS "uses-python"
)
# We must now test this works without the build flag.
add_executable( BazelReporterNoCatchConfig ${TESTS_DIR}/X30-BazelReporter.cpp )
target_link_libraries(BazelReporterNoCatchConfig Catch2WithMain)
add_test(NAME NO_CATCH_CONFIG_BAZEL_REPORTER-1
COMMAND
"${PYTHON_EXECUTABLE}" "${CATCH_DIR}/tests/TestScripts/testBazelReporter.py" $<TARGET_FILE:BazelReporterNoCatchConfig> "${CMAKE_CURRENT_BINARY_DIR}"
)
set_tests_properties(NO_CATCH_CONFIG_BAZEL_REPORTER-1
PROPERTIES
LABELS "uses-python"
ENVIRONMENT "BAZEL_TEST=1"
)
# 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