Rollup merge of #93479 - smoelius:master, r=yaahc

Use `optflag` for `--report-time`

Essentially, what is described here:
https://github.com/rust-lang/rust/issues/64888#issuecomment-1008047228

There is one difference. The comment proposes to add a
`--report-time-color` option. This change instead uses libtest's
existing `--color` option for that purpose.
This commit is contained in:
Matthias Krüger 2022-02-17 06:29:59 +01:00 committed by GitHub
commit d855121a44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 22 deletions

View file

@ -267,7 +267,7 @@ Controls the format of the output. Valid options:
Writes the results of the tests to the given file.
#### `--report-time` _FORMAT_
#### `--report-time`
⚠️ 🚧 This option is [unstable](#unstable-options), and requires the `-Z
unstable-options` flag. See [tracking issue

View file

@ -21,11 +21,8 @@ Sample usage command:
Available options:
```sh
--report-time [plain|colored]
Show execution time of each test. Available values:
plain = do not colorize the execution time (default);
colored = colorize output according to the `color`
parameter value;
--report-time
Show execution time of each test.
Threshold values for colorized output can be
configured via
`RUST_TEST_TIME_UNIT`, `RUST_TEST_TIME_INTEGRATION`