-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
src/test/run-make*/coverage* tests should be reimplemented as a custom compiletest #85009
Labels
A-code-coverage
Area: Source-based code coverage (-Cinstrument-coverage)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
Comments
@rustbot +A-code-coverage |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jun 29, 2023
Convert `run-make/coverage-reports` tests to use a custom compiletest mode I was frustrated by the fact that most of the coverage tests are glued together with makefiles and shell scripts, so I tried my hand at converting most of them over to a newly-implemented `run-coverage` mode/suite in compiletest. This ~~*mostly*~~ resolves rust-lang#85009, ~~though I've left a small number of the existing tests as-is because they would require more work to fix/support~~. --- I had time to go back and add support for the more troublesome tests that I had initially skipped over, so this PR now manages to completely get rid of `run-make/coverage-reports`. --- The patches are arranged as follows: - Declare the new mode/suite in bootstrap - Small changes to compiletest that will be used by the new mode - Implement the new mode in compiletest - Migrate most of the tests over - Add more code to bootstrap and compiletest to support the remaining tests - Migrate the remaining tests (with some temporary hacks to avoid re-blessing them) - Remove the temporary hacks and re-bless the migrated tests - Remove the unused remnants of `run-make/coverage-reports`
compiler-errors
added a commit
to compiler-errors/rust
that referenced
this issue
Jun 30, 2023
Convert `run-make/coverage-reports` tests to use a custom compiletest mode I was frustrated by the fact that most of the coverage tests are glued together with makefiles and shell scripts, so I tried my hand at converting most of them over to a newly-implemented `run-coverage` mode/suite in compiletest. This ~~*mostly*~~ resolves rust-lang#85009, ~~though I've left a small number of the existing tests as-is because they would require more work to fix/support~~. --- I had time to go back and add support for the more troublesome tests that I had initially skipped over, so this PR now manages to completely get rid of `run-make/coverage-reports`. --- The patches are arranged as follows: - Declare the new mode/suite in bootstrap - Small changes to compiletest that will be used by the new mode - Implement the new mode in compiletest - Migrate most of the tests over - Add more code to bootstrap and compiletest to support the remaining tests - Migrate the remaining tests (with some temporary hacks to avoid re-blessing them) - Remove the temporary hacks and re-bless the migrated tests - Remove the unused remnants of `run-make/coverage-reports`
There is still one test left in It mostly delegates to |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-code-coverage
Area: Source-based code coverage (-Cinstrument-coverage)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
The coverage tests (for
-Z instrument-coverage
) are implemented usingMakefile
s and embedded shell scripts, which is fragile.Some cross-platform issues are unavoidable, but there have been some cross-platform issues, due to differences in the shell scripts and external commands (like
sed
).Also, there is a known bug in some versions of
make
onMacOS
that corrupts shell scripts during script interpretation.Some of these issues could be avoided in the future if the test logic was rewritten/ported to Rust as a
compiletest
.The text was updated successfully, but these errors were encountered: