Skip to content

Add citool command for generating a test dashboard #139978

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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Apr 17, 2025

This PR implements an initial version of a test suite dashboard, which shows which tests were executed on CI and which tests were ignored. This was discussed here. The dashboard is still quite bare-bones, but I think that it could already be useful.

The next step is to create a job index, similarly to the post-merge report, and link from the individual tests to the job that executed them.

You can try it locally like this:

$ cargo run --manifest-path src/ci/citool/Cargo.toml --release \
    -- test-dashboard 38c560ae681d5c0d3fd615eaedc537a282fb1086 --output-dir dashboard

and then open dashboard/index.html in a web browser.

CC @wesleywiser

r? @jieyouxu

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Apr 17, 2025
@Kobzol Kobzol changed the title Ci test summary Add citool command for generating a test dashboard Apr 17, 2025
@jieyouxu
Copy link
Member

FTR, the dashboard currently looks like:

Screenshot 2025-04-18 164349
Screenshot 2025-04-18 164433

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! The impl looks good, played around with the generated dashboard locally and the initial version's content looks like what I'd expect.

@jieyouxu
Copy link
Member

jieyouxu commented Apr 18, 2025

An example test (edited test path to be from tests/):

tests/codegen/autodiff/scalar.rs (passed: 0, ignored: 23)

That seems a bit surprising -- passed: 0 looks right, I definitely don't satisfy //@ needs-enzyme locally. However the ignored: 23 seems a bit high -- this is a codegen test that doesn't use any revisions 🤔

Or for instance,

tests/assembly/compiletest-self-test/use-minicore-no-run.rs (passed: 24, ignored: 0)

That passed: 24 seems too high?

Or what do these actually indicate?

@Kobzol
Copy link
Contributor Author

Kobzol commented Apr 18, 2025

The number is a cartesian product of stage x target x CI job combinations where the test was executed or ignored. In most cases, there is 1 stage and 1 target per CI job, so it's more or less the number of CI jobs that ran the test.

@jieyouxu
Copy link
Member

jieyouxu commented Apr 18, 2025

Hm right, it's the coalesced counts.

@jieyouxu
Copy link
Member

jieyouxu commented Apr 18, 2025

The number is a cartesian product of stage x target x CI job combinations where the test was executed or ignored. In most cases, there is 1 stage and 1 target per CI job, so it's more or less the number of CI jobs that ran the test.

Should we maybe add this as like a banner thing / or include this remark somehow on the page, because I imagine I won't be the first one to ask this question :D

@Kobzol
Copy link
Contributor Author

Kobzol commented Apr 18, 2025

Yeah, I would like to extend the amount of information on the page, but the problem is that with 20k tests every small amount of HTML per test is gonna add up quickly 😆 The page already has 2 MiB. I wanted to land this as an initial version and then do incremental improvements in follow-up PRs, to avoid having too much stuff at once in a PR.

@jieyouxu
Copy link
Member

jieyouxu commented Apr 18, 2025

Oh I just mean an overall note, like

Here's how to interpret the "passed" and "ignored" counts: they are coalsced between stage x target x CI jobs where the test was executed or ignored.

Not like, individual per-test remarks, if that makes sense?

EDIT: with some inspect element gaming, I mean

Screenshot 2025-04-18 174738

@jieyouxu
Copy link
Member

But in any case I don't think it's worth blocking over that, so feel free to r=me with or without the remark.

@jieyouxu
Copy link
Member

Thanks!
@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 18, 2025

📌 Commit cecf167 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 18, 2025
@Kobzol
Copy link
Contributor Author

Kobzol commented Apr 18, 2025

I was just about to add the note =D I also noticed one thing I want to fix.

@bors r-

@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 18, 2025
@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 18, 2025
Kobzol added 2 commits April 18, 2025 12:32
`assembly/asm` contained a test named `asm/aarch64-el2vmsa.rs`, while it should have been only `arch64-el2vmsa.rs`.
@Kobzol
Copy link
Contributor Author

Kobzol commented Apr 18, 2025

Added the note and removed duplicated subdirectory name in the name of nested tests.

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks. r=me after PR CI is 🍏

@Kobzol
Copy link
Contributor Author

Kobzol commented Apr 18, 2025

@bors r=jieyouxu rollup

@bors
Copy link
Collaborator

bors commented Apr 18, 2025

📌 Commit b18e373 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 18, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 18, 2025
Add citool command for generating a test dashboard

This PR implements an initial version of a test suite dashboard, which shows which tests were executed on CI and which tests were ignored. This was discussed [here](https://rust-lang.zulipchat.com/#narrow/channel/238009-t-compiler.2Fmeetings/topic/.5Bsteering.5D.202025-04-11.20Dealing.20with.20disabled.20tests/with/512799036). The dashboard is still quite bare-bones, but I think that it could already be useful.

The next step is to create a job index, similarly to the post-merge report, and link from the individual tests to the job that executed them.

You can try it locally like this:
```bash
$ cargo run --manifest-path src/ci/citool/Cargo.toml --release \
    -- test-dashboard 38c560a --output-dir dashboard
```
and then open `dashboard/index.html` in a web browser.

CC `@wesleywiser`

r? `@jieyouxu`
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 18, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#137454 (not lint break with label and unsafe block)
 - rust-lang#138934 (support config extensions)
 - rust-lang#139297 (Deduplicate & clean up Nix shell)
 - rust-lang#139834 (Don't canonicalize crate paths)
 - rust-lang#139868 (Move `pal::env` into `std::sys::env_consts`)
 - rust-lang#139978 (Add citool command for generating a test dashboard)
 - rust-lang#140000 (skip llvm-config in autodiff check builds, when its unavailable)
 - rust-lang#140007 (Disable has_thread_local on i686-win7-windows-msvc)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 18, 2025
Add citool command for generating a test dashboard

This PR implements an initial version of a test suite dashboard, which shows which tests were executed on CI and which tests were ignored. This was discussed [here](https://rust-lang.zulipchat.com/#narrow/channel/238009-t-compiler.2Fmeetings/topic/.5Bsteering.5D.202025-04-11.20Dealing.20with.20disabled.20tests/with/512799036). The dashboard is still quite bare-bones, but I think that it could already be useful.

The next step is to create a job index, similarly to the post-merge report, and link from the individual tests to the job that executed them.

You can try it locally like this:
```bash
$ cargo run --manifest-path src/ci/citool/Cargo.toml --release \
    -- test-dashboard 38c560a --output-dir dashboard
```
and then open `dashboard/index.html` in a web browser.

CC ``@wesleywiser``

r? ``@jieyouxu``
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 18, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#137454 (not lint break with label and unsafe block)
 - rust-lang#138934 (support config extensions)
 - rust-lang#139297 (Deduplicate & clean up Nix shell)
 - rust-lang#139834 (Don't canonicalize crate paths)
 - rust-lang#139978 (Add citool command for generating a test dashboard)
 - rust-lang#140000 (skip llvm-config in autodiff check builds, when its unavailable)
 - rust-lang#140007 (Disable has_thread_local on i686-win7-windows-msvc)

r? `@ghost`
`@rustbot` modify labels: rollup
jhpratt added a commit to jhpratt/rust that referenced this pull request Apr 19, 2025
Add citool command for generating a test dashboard

This PR implements an initial version of a test suite dashboard, which shows which tests were executed on CI and which tests were ignored. This was discussed [here](https://rust-lang.zulipchat.com/#narrow/channel/238009-t-compiler.2Fmeetings/topic/.5Bsteering.5D.202025-04-11.20Dealing.20with.20disabled.20tests/with/512799036). The dashboard is still quite bare-bones, but I think that it could already be useful.

The next step is to create a job index, similarly to the post-merge report, and link from the individual tests to the job that executed them.

You can try it locally like this:
```bash
$ cargo run --manifest-path src/ci/citool/Cargo.toml --release \
    -- test-dashboard 38c560a --output-dir dashboard
```
and then open `dashboard/index.html` in a web browser.

CC ```@wesleywiser```

r? ```@jieyouxu```
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 19, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang#137454 (not lint break with label and unsafe block)
 - rust-lang#139297 (Deduplicate & clean up Nix shell)
 - rust-lang#139535 (Implement `Default` for raw pointers)
 - rust-lang#139753 (Make `#[naked]` an unsafe attribute)
 - rust-lang#139922 (fix incorrect type in cstr `to_string_lossy()` docs)
 - rust-lang#139978 (Add citool command for generating a test dashboard)
 - rust-lang#140007 (Disable has_thread_local on i686-win7-windows-msvc)
 - rust-lang#140016 (std: Use fstatat() on illumos)
 - rust-lang#140025 (Re-remove `AdtFlags::IS_ANONYMOUS`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 19, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#137454 (not lint break with label and unsafe block)
 - rust-lang#138934 (support config extensions)
 - rust-lang#139297 (Deduplicate & clean up Nix shell)
 - rust-lang#139834 (Don't canonicalize crate paths)
 - rust-lang#139978 (Add citool command for generating a test dashboard)
 - rust-lang#140000 (skip llvm-config in autodiff check builds, when its unavailable)
 - rust-lang#140007 (Disable has_thread_local on i686-win7-windows-msvc)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 19, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#137454 (not lint break with label and unsafe block)
 - rust-lang#138934 (support config extensions)
 - rust-lang#139297 (Deduplicate & clean up Nix shell)
 - rust-lang#139834 (Don't canonicalize crate paths)
 - rust-lang#139978 (Add citool command for generating a test dashboard)
 - rust-lang#140000 (skip llvm-config in autodiff check builds, when its unavailable)
 - rust-lang#140007 (Disable has_thread_local on i686-win7-windows-msvc)

r? `@ghost`
`@rustbot` modify labels: rollup
ChrisDenton added a commit to ChrisDenton/rust that referenced this pull request Apr 19, 2025
Add citool command for generating a test dashboard

This PR implements an initial version of a test suite dashboard, which shows which tests were executed on CI and which tests were ignored. This was discussed [here](https://rust-lang.zulipchat.com/#narrow/channel/238009-t-compiler.2Fmeetings/topic/.5Bsteering.5D.202025-04-11.20Dealing.20with.20disabled.20tests/with/512799036). The dashboard is still quite bare-bones, but I think that it could already be useful.

The next step is to create a job index, similarly to the post-merge report, and link from the individual tests to the job that executed them.

You can try it locally like this:
```bash
$ cargo run --manifest-path src/ci/citool/Cargo.toml --release \
    -- test-dashboard 38c560a --output-dir dashboard
```
and then open `dashboard/index.html` in a web browser.

CC ````@wesleywiser````

r? ````@jieyouxu````
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants