rust/src
bors 66676820eb Auto merge of #108659 - ferrocene:pa-test-metrics, r=Mark-Simulacrum
Include executed tests in the build metrics (and use a custom test display impl)

The main goal of this PR is to include all tests executed in CI inside the build metrics JSON files. I need this for Ferrocene, and `@Mark-Simulacrum` expressed desire to have this as well to ensure all tests are executed at least once somewhere in CI.

Unfortunately implementing this required rewriting inside of bootstrap all of the code to render the test output to console. libtest supports outputting JSON instead of raw text, which we can indeed use to populate the build metrics. Doing that suppresses the console output though, and compared to rustc and Cargo the console output is not included as a JSON field.

Because of that, this PR had to reimplement both the "pretty" format (one test per line, with `rust.verbose-tests = true`), and the "terse" format (the wall of dots, with `rust.verbose-tests = false`). The current implementation should have the exact same output as libtest, except for the benchmark output. libtest's benchmark output is broken in the "terse" format, so since that's our default I slightly improved how it's rendered.

Also, to bring parity with libtest I had to introduce support for coloring output from bootstrap, using the same dependencies `annotate-snippets` uses. It's now possible to use `builder.color_for_stdout(Color::Red, "text")` and `builder.color_for_stderr(Color::Green, "text")` across all of bootstrap, automatically respecting the `--color` flag and whether the stream is a terminal or not.

I recommend reviewing the PR commit-by-commit.
r? `@Mark-Simulacrum`
2023-03-21 14:33:14 +00:00
..
bootstrap Auto merge of #108659 - ferrocene:pa-test-metrics, r=Mark-Simulacrum 2023-03-21 14:33:14 +00:00
ci Rollup merge of #109124 - ferrocene:pa-compression-mode, r=Mark-Simulacrum 2023-03-21 13:00:23 +01:00
doc Rollup merge of #108722 - petrhosek:fuchsia-riscv, r=petrochenkov 2023-03-14 17:40:03 +01:00
etc Rename src/etc/vscode_settings.json to rust_analyzer_settings.json 2023-03-01 22:58:05 +05:30
librustdoc Rollup merge of #109266 - petrochenkov:docice4, r=petrochenkov 2023-03-20 09:46:52 +01:00
llvm-project@fd949f3034 Revert "Auto merge of #107224 - nikic:llvm-16, r=cuviper" 2023-03-18 23:49:24 +01:00
rustdoc-json-types fix inconsistent json outputs from rustdoc 2023-03-05 00:09:09 +03:00
tools Auto merge of #108659 - ferrocene:pa-test-metrics, r=Mark-Simulacrum 2023-03-21 14:33:14 +00:00
README.md Remove stale reference to the test suite location 2023-01-13 11:49:06 +00:00
stage0.json Bump to latest beta 2023-03-15 08:55:22 -04:00
version Bump version to 1.70.0 2023-03-04 10:10:46 -05:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.