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

summaryrefslogtreecommitdiffhomepage
path: root/docs
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 /docs
parent078201fcf44b452e0afad9c383229ad854fa245e (diff)
downloadcatch3-7e4ec432d00ccb082846bf9a74c6d8b48e039ba9.tar.gz
Change Bazel XML support to depend upon BAZEL_TEST
Diffstat (limited to 'docs')
-rw-r--r--docs/configuration.md6
-rw-r--r--docs/deprecations.md9
2 files changed, 13 insertions, 2 deletions
diff --git a/docs/configuration.md b/docs/configuration.md
index d5463343..d857e792 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -98,11 +98,13 @@ is equivalent with the out-of-the-box experience.
## Bazel support
-When `CATCH_CONFIG_BAZEL_SUPPORT` is defined, Catch2 will register a `JUnit`
-reporter writing to a path pointed by `XML_OUTPUT_FILE` provided by Bazel.
+When `CATCH_CONFIG_BAZEL_SUPPORT` is defined or when `BAZEL_TEST=1` (which is set by the Bazel inside of a test environment),
+Catch2 will register a `JUnit` reporter writing to a path pointed by `XML_OUTPUT_FILE` provided by Bazel.
> `CATCH_CONFIG_BAZEL_SUPPORT` was [introduced](https://github.com/catchorg/Catch2/pull/2399) in Catch2 3.0.1.
+> `CATCH_CONFIG_BAZEL_SUPPORT` was [deprecated](https://github.com/catchorg/Catch2/pull/2459) in Catch2 X.Y.Z.
+
## C++11 toggles
CATCH_CONFIG_CPP11_TO_STRING // Use `std::to_string`
diff --git a/docs/deprecations.md b/docs/deprecations.md
index 3319e52b..2c9bf551 100644
--- a/docs/deprecations.md
+++ b/docs/deprecations.md
@@ -17,6 +17,15 @@ as it can be replaced by `Catch.cmake` that provides the function
command line interface instead of parsing C++ code with regular expressions.
+### `CATCH_CONFIG_BAZEL_SUPPORT`
+
+Catch2 supports writing the Bazel JUnit XML output file when it is aware
+that is within a bazel testing environment. Originally there was no way
+to accurately probe the environment for this information so the flag
+`CATCH_CONFIG_BAZEL_SUPPORT` was added. This now deprecated. Bazel has now had a change
+where it will export `BAZEL_TEST=1` for purposes like the above. Catch2
+will now instead inspect the environment instead of relying on build configuration.
+
---
[Home](Readme.md#top)