You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`bazel test` sets the `XML_OUTPUT_FILE` environment variable which
specifies where the JUnit output of the test executable should be
written.
Picking up this variable allows catch2 to naturally integrate into
the Bazel testing ecosystem out-of-the-box.
The environment variable processing is hidden behind the
`CATCH_CONFIG_MAIN_BAZEL_XML_OUTPUT_FILE` define and it _only_
enabled in the `BUILD.bazel`.
This allows the Bazel ecosystem to create a `cc_test` target as
follows:
```
cc_test(
name = "some_test",
deps = ["@catch2//:catch2_main"],
srcs = globs("**/*_test.cpp"),
)
```
The output will be written to `bazel-testlogs/some_test/test.xml`
0 commit comments