-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Splitting up compiletest::runtest
#89475
Comments
…ark-Simulacrum Move items related to computing diffs to a separate file Work towards rust-lang#89475.
…ed, r=Mark-Simulacrum Move `read2_abbreviated` function into read2.rs Work towards rust-lang#89475.
…ed, r=Mark-Simulacrum Move `read2_abbreviated` function into read2.rs Work towards rust-lang#89475.
…=Mark-Simulacrum Move `DebuggerCommands` and `check_debugger_output` to a separate module Work towards rust-lang#89475. As part of this move, the public functions were changed to return `Result`. This is so that the error handling that initially took `&self: TestCx` can still use that `TestCx`.
@Mark-Simulacrum I have started reading
I can see simplifying |
@rustbot label: +C-cleanup. |
I think there's room for unifying the two -- we already have some support for running tests under a wrapper for e.g. android testing, so I imagine we might be able to reuse parts of that perhaps. |
Extract coverage-specific code out of `compiletest::runtest` I had been vaguely intending to do this for a while, but seeing rust-lang#89475 on the compiletest dashboard inspired me to actually go and do it. This moves a few hundred lines of coverage-specific code out of the main module, making navigation a bit easier. There is still a small amount of coverage-specific logic in broader functions in that module, since it can't easily be moved. This is just cut-and-paste plus fixing visibility and imports, so no functional changes. I also removed the unit test for anonymizing line numbers in MC/DC reports, as foreshadowed by the comment I wrote when adding it. That functionality is now adequately exercised by the actual snapshot tests for MC/DC coverage. (Removing the test now avoids the need to move it, or to make the function it calls visible.)
Rollup merge of rust-lang#125719 - Zalathar:run-coverage, r=jieyouxu Extract coverage-specific code out of `compiletest::runtest` I had been vaguely intending to do this for a while, but seeing rust-lang#89475 on the compiletest dashboard inspired me to actually go and do it. This moves a few hundred lines of coverage-specific code out of the main module, making navigation a bit easier. There is still a small amount of coverage-specific logic in broader functions in that module, since it can't easily be moved. This is just cut-and-paste plus fixing visibility and imports, so no functional changes. I also removed the unit test for anonymizing line numbers in MC/DC reports, as foreshadowed by the comment I wrote when adding it. That functionality is now adequately exercised by the actual snapshot tests for MC/DC coverage. (Removing the test now avoids the need to move it, or to make the function it calls visible.)
I really need to make sure we split up |
Rollup merge of rust-lang#130566 - jieyouxu:breakup-runtest, r=compiler-errors Break up compiletest `runtest.rs` into smaller helper modules Previously compiletest's `runtest.rs` was a massive 4700 lines file that made reading and navigation very awkward. This PR breaks the `runtest.rs` file up into smaller helper modules, one for each test suite/mode. > [!NOTE] > This PR should not contain functional changes, it is intended to be mostly code motion to breakup `runtest.rs` into smaller helper modules to make it easier to digest. > > This PR intentionally does not neatly reorganize where all the methods on `TestCx` goes, that is intended for a follow-up PR. Some methods on `TestCx` do not need to be on `TestCx`. It also does not address a weirdness in valgrind, that is intended for a follow-up PR as well. Part of a series of compiletest cleanups rust-lang#130565. Fixes rust-lang#89475. r? `@ghost` (I need to do a self-review pass first)
Subtask to #60302.
// use-valgrind
or something like that.I suspect this set of changes is likely harder, and might not get to <3000 lines; there's likely more cleanup work possible, though. This module has grown pretty organically over the last ~10 years -- there's a lot of small bits that can be adjusted to make things better. There's probably also subtle inconsistencies between various functions that would likely be nice to clean up and unify, and filing PRs for those would be helpful -- likely some care is needed, perhaps even some small test updates, but overall a good goal.
You might also be interested in #40713, as a somewhat larger project.
Originally posted by @Mark-Simulacrum in #89240 (comment)
The text was updated successfully, but these errors were encountered: