-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Include test suite metadata in the build metrics #111936
Conversation
This comment has been minimized.
This comment has been minimized.
2718e65
to
0553f71
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems broadly good 👍 except that I'm confused why METADATA_VERSION is necessary. Thank you for using the new run_cargo_test
abstraction instead of duplicating the code ❤️
Addressed or responded to all feedback. @rustbot ready |
The new name is more accurate.
Also renamed |
r=me with CI passing :) |
@bors r=jyn514 |
…llaumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#111936 (Include test suite metadata in the build metrics) - rust-lang#111952 (Remove DesugaringKind::Replace.) - rust-lang#111966 (Add #[inline] to array TryFrom impls) - rust-lang#111983 (Perform MIR type ops locally in new solver) - rust-lang#111997 (Fix re-export of doc hidden macro not showing up) - rust-lang#112014 (rustdoc: get unnormalized link destination for suggestions) r? `@ghost` `@rustbot` modify labels: rollup
232: Split and refactor the test outcomes page r=Veykril a=pietroalbini This PR changes how the test outcomes page's content is structured, splitting it into one page per target. This has two purposes: * Reduce the clutter on the page, which would otherwise mix information of all qualified targets. * Provide an accurate list of ignored tests, as each target now has the list of tests it ignored rather than just displaying a list of tests ignored by *all* targets. To simplify the generation of the separate pages, I changed how the `ferrocene_test_outcomes` extension works. Rather than having `.. ignored-tests::` and `.. suite-summary::` directives that are rendered in Python code, the extension now gathers and organizes the data, and defers the rendering of the information to a Jinja2 rST template. This results in the whole test results page being rendered by the template, which eases the maintenance of those pages. For example, a note that should be displayed only on cross-compiled targets can now be gated behind `{% if host != target %}`. Finally, while refactoring I removed the whole parsing code of the debug representation of steps, replacing it with the [structured test metadata](rust-lang/rust#111936) I added a while back. This will increase the robustness of the tool. There are still some open issues on this I'll address in a future PR: * The list of crates for the bootstrap test suite is empty. * The note for doc-tests not being executed is not present on aarch64. * I'd like to add references to the test suite definitions in the evaluation plan. * I'd like to see if I can make the information displayed in the page more concise. 238: Code Coverage Support for Core Library [DUPLICATE] r=pietroalbini a=Ax9DTW Bors is stuck on #180, so this duplicate. 243: Automated pull from `rust-lang/libc` r=Veykril a=github-actions[bot] This PR pulls the following changes from the [`rust-lang/libc`](https://github.com/rust-lang/libc) repository: * `3570`: [[Backport #3548] Add ioctl FS_IOC_{G,S}{ETVERSION,ETFLAGS} for LoongArch64](https://www.github.com/rust-lang/libc/issues/3570) * `3553`: [Add MFD_NOEXEC_SEAL and MFD_EXEC](https://www.github.com/rust-lang/libc/issues/3553) * `3554`: [Backport of #3546 and update crate version to 0.2.153](https://www.github.com/rust-lang/libc/issues/3554) Co-authored-by: Pietro Albini <[email protected]> Co-authored-by: Atri Sarkar <[email protected]> Co-authored-by: Gnana Ganesh <[email protected]> Co-authored-by: rusty-snake <[email protected]> Co-authored-by: Guillaume Gomez <[email protected]> Co-authored-by: WANG Rui <[email protected]> Co-authored-by: Yuki Okushi <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
232: Split and refactor the test outcomes page r=Veykril a=pietroalbini This PR changes how the test outcomes page's content is structured, splitting it into one page per target. This has two purposes: * Reduce the clutter on the page, which would otherwise mix information of all qualified targets. * Provide an accurate list of ignored tests, as each target now has the list of tests it ignored rather than just displaying a list of tests ignored by *all* targets. To simplify the generation of the separate pages, I changed how the `ferrocene_test_outcomes` extension works. Rather than having `.. ignored-tests::` and `.. suite-summary::` directives that are rendered in Python code, the extension now gathers and organizes the data, and defers the rendering of the information to a Jinja2 rST template. This results in the whole test results page being rendered by the template, which eases the maintenance of those pages. For example, a note that should be displayed only on cross-compiled targets can now be gated behind `{% if host != target %}`. Finally, while refactoring I removed the whole parsing code of the debug representation of steps, replacing it with the [structured test metadata](rust-lang/rust#111936) I added a while back. This will increase the robustness of the tool. There are still some open issues on this I'll address in a future PR: * The list of crates for the bootstrap test suite is empty. * The note for doc-tests not being executed is not present on aarch64. * I'd like to add references to the test suite definitions in the evaluation plan. * I'd like to see if I can make the information displayed in the page more concise. Co-authored-by: Pietro Albini <[email protected]>
232: Split and refactor the test outcomes page r=Veykril a=pietroalbini This PR changes how the test outcomes page's content is structured, splitting it into one page per target. This has two purposes: * Reduce the clutter on the page, which would otherwise mix information of all qualified targets. * Provide an accurate list of ignored tests, as each target now has the list of tests it ignored rather than just displaying a list of tests ignored by *all* targets. To simplify the generation of the separate pages, I changed how the `ferrocene_test_outcomes` extension works. Rather than having `.. ignored-tests::` and `.. suite-summary::` directives that are rendered in Python code, the extension now gathers and organizes the data, and defers the rendering of the information to a Jinja2 rST template. This results in the whole test results page being rendered by the template, which eases the maintenance of those pages. For example, a note that should be displayed only on cross-compiled targets can now be gated behind `{% if host != target %}`. Finally, while refactoring I removed the whole parsing code of the debug representation of steps, replacing it with the [structured test metadata](rust-lang/rust#111936) I added a while back. This will increase the robustness of the tool. There are still some open issues on this I'll address in a future PR: * The list of crates for the bootstrap test suite is empty. * The note for doc-tests not being executed is not present on aarch64. * I'd like to add references to the test suite definitions in the evaluation plan. * I'd like to see if I can make the information displayed in the page more concise. 245: Inject channel dynamically into sphinx substitutions r=pietroalbini a=Veykril Co-authored-by: Pietro Albini <[email protected]> Co-authored-by: Lukas Wirth <[email protected]>
This PR enhances the build metadata to include structured information about the test suites being executed, allowing external tools consuming the metadata to understand what was being tested.
The included metadata is:
This is implemented by replacing the
test
JSON node with a newtest_suite
node, which contains the metadata and the list of tests. This change also improves the handling of multiple test suites executed in the same step (for example in compiletest tests with a compare mode), as the multiple test suite executions will now be tracked in separatetest_suite
nodes.This included a breaking change in the build metrics metadata format. To better handle this, in the second commit this PR introduces the
metadata_version
top-level field. The old version is considered to be0
, while the new one1
. Bootstrap will also gracefully handle existing metadata of a different version.r? @jyn514