Allow coverage tests to ignore test modes, and to enable color in coverage reports#119034
Merged
bors merged 4 commits intorust-lang:masterfrom Jan 5, 2024
Merged
Allow coverage tests to ignore test modes, and to enable color in coverage reports#119034bors merged 4 commits intorust-lang:masterfrom
bors merged 4 commits intorust-lang:masterfrom
Conversation
Collaborator
|
(rustbot has picked a reviewer for you, use r? to override) |
This was referenced Dec 17, 2023
Swatinem
approved these changes
Dec 17, 2023
Zalathar
commented
Dec 17, 2023
Contributor
|
sorry, too busy to review this r? compiler |
davidtwco
approved these changes
Jan 3, 2024
Member
davidtwco
left a comment
There was a problem hiding this comment.
r=me unless you want to adopt my suggestion below
58a15e7 to
3342195
Compare
Member
Author
Member
Author
|
Having |
Normally, each test in `tests/coverage` is automatically run in both `coverage-map` mode and `coverage-run` mode. This new family of directives allows an individual test to specify that it should not be run in a particular mode.
davidtwco
approved these changes
Jan 5, 2024
Member
|
@bors r+ |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 5, 2024
…mpiler-errors Rollup of 10 pull requests Successful merges: - rust-lang#119034 (Allow coverage tests to ignore test modes, and to enable color in coverage reports) - rust-lang#119148 (Tweak suggestions for bare trait used as a type) - rust-lang#119538 (Cleanup error handlers: round 5) - rust-lang#119566 (Remove `-Zdump-mir-spanview`) - rust-lang#119567 (Remove `-Zreport-delayed-bugs`.) - rust-lang#119577 (Migrate memory overlap check from validator to lint) - rust-lang#119583 (Make `intrinsics::assume` const stable) - rust-lang#119586 ([rustdoc] Fix invalid handling for static method calls in jump to definition feature) - rust-lang#119588 (Move `i586-unknown-netbsd` from tier 2 to tier 3 platform support table) - rust-lang#119601 (`Emitter` cleanups) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 5, 2024
Rollup merge of rust-lang#119034 - Zalathar:ignore-mode, r=davidtwco Allow coverage tests to ignore test modes, and to enable color in coverage reports This PR adds two new header directives to compiletest, intended for use by coverage tests (and by rust-lang#119033 in particular). The new headers are: - `// ignore-mode-{mode}` causes a test to not be run in a particular compiletest mode (e.g. `ignore-mode-coverage-run`). - This can theoretically be used by any test, but coverage tests are currently the only ones that automatically run in multiple modes, so it's not very useful for other kinds of test. - `// llvm-cov-flags: --use-color` makes `coverage-run` tests pass the flag `--use-color` when generating coverage reports. - For most tests, non-coloured reports are easier to read and more portable across platforms. But for rust-lang#119033 specifically, we want to test that `llvm-cov` slices up source text correctly, which only happens when colour output is enabled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds two new header directives to compiletest, intended for use by coverage tests (and by #119033 in particular).
The new headers are:
// ignore-mode-{mode}causes a test to not be run in a particular compiletest mode (e.g.ignore-mode-coverage-run).// llvm-cov-flags: --use-colormakescoverage-runtests pass the flag--use-colorwhen generating coverage reports.llvm-covexpects column numbers to be bytes, not code points #119033 specifically, we want to test thatllvm-covslices up source text correctly, which only happens when colour output is enabled.