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

summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorBrandon Jones2022-06-14 10:56:19 +0100
committerMartin Hořeňovský2022-06-17 16:36:14 +0200
commit7e4ec432d00ccb082846bf9a74c6d8b48e039ba9 (patch)
tree78b158561d145db39afddc75ccf9e1df1d03c5c0 /tests
parent078201fcf44b452e0afad9c383229ad854fa245e (diff)
downloadcatch3-7e4ec432d00ccb082846bf9a74c6d8b48e039ba9.tar.gz
Change Bazel XML support to depend upon BAZEL_TEST
Diffstat (limited to 'tests')
-rw-r--r--tests/ExtraTests/CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ExtraTests/CMakeLists.txt b/tests/ExtraTests/CMakeLists.txt
index f33bd7c1..f1a02af3 100644
--- a/tests/ExtraTests/CMakeLists.txt
+++ b/tests/ExtraTests/CMakeLists.txt
@@ -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