bazelbuild / bazelbuild/rules_rust

Supporting junit XML report in rust_test

Open
#1,303 8 comments 0 reactions 0 assignees View on GitHub
enhancement needs-triage
Dominant language
Starlark
Stars
843
Forks
651
Avg merge
2d 18h
Merged PRs (30d)
15

Description

Currently `rust_test` does not support generating junit xml report out-of-the-box.

To support this for all rust test target, a workaround is with the `--run_under` flag and a script that writes the xml report from stdout to $XML_OUTPUT_FILE:

```
#!/bin/bash
$@ -Zunstable-options --format=junit --report-time | tee $XML_OUTPUT_FILE
```

The main downside is having to declare the script as a `data` dependency for every rust test target.

It would be nice to have built-in support for this in rust_test as an option, would it be sensible to add this to the rust test launcher?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.