Skip to content

Conversation

ranger-ross
Copy link
Contributor

@ranger-ross ranger-ross commented Jan 11, 2025

This PR adds a new test render format specifically for ci.
The goal as stated in #134910 is to make reviewing test failures in CI easier.

See the new test output format in the CI for this PR (here)

closes #134910 cc: @jyn514

@rustbot
Copy link
Collaborator

rustbot commented Jan 11, 2025

r? @onur-ozkan

rustbot has assigned @onur-ozkan.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jan 11, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@ranger-ross ranger-ross force-pushed the improved-ci-logs branch 2 times, most recently from a150888 to 053f028 Compare January 11, 2025 11:42
@ranger-ross ranger-ross changed the title [work in progress] improving ci log output ci: added test log format for ci Jan 11, 2025
@ranger-ross ranger-ross marked this pull request as ready for review January 11, 2025 12:50
@ranger-ross
Copy link
Contributor Author

@rustbot label +A-CI +A-testsuite

@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc labels Jan 11, 2025
@jyn514
Copy link
Member

jyn514 commented Jan 11, 2025

this is really cool. can you give an example of what it looks like for a failing test?

@ranger-ross
Copy link
Contributor Author

Sure, it looks like this.
I left the failed test output mostly unchanged other than fully spelling out FAILED instead of just F (for easier searching hopefully)

running 18249 tests
10%  --  1825/18249,  1787 passed, 0 failed, 38 ignored
20%  --  3650/18249,  3606 passed, 0 failed, 44 ignored
30%  --  5475/18249,  5423 passed, 0 failed, 52 ignored
   [ui] tests/ui/explicit-i-suffix.rs ... FAILED
40%  --  7300/18249,  7237 passed, 1 failed, 62 ignored
50%  --  9125/18249,  9052 passed, 1 failed, 72 ignored
60%  -- 10950/18249, 10849 passed, 1 failed, 100 ignored
70%  -- 12775/18249, 12664 passed, 1 failed, 110 ignored
   [ui] tests/ui/process/nofile-limit.rs ... FAILED
80%  -- 14600/18249, 14445 passed, 2 failed, 153 ignored
90%  -- 16425/18249, 16259 passed, 2 failed, 164 ignored
100% -- 18249/18249, 18078 passed, 2 failed, 169 ignored


failures:

---- [ui] tests/ui/explicit-i-suffix.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 1

..... the command and stdout (unchanged)

@onur-ozkan
Copy link
Contributor

Sure, it looks like this. I left the failed test output mostly unchanged other than fully spelling out FAILED instead of just F (for easier searching hopefully)

running 18249 tests
10%  --  1825/18249,  1787 passed, 0 failed, 38 ignored
20%  --  3650/18249,  3606 passed, 0 failed, 44 ignored
30%  --  5475/18249,  5423 passed, 0 failed, 52 ignored
   [ui] tests/ui/explicit-i-suffix.rs ... FAILED
40%  --  7300/18249,  7237 passed, 1 failed, 62 ignored
50%  --  9125/18249,  9052 passed, 1 failed, 72 ignored
60%  -- 10950/18249, 10849 passed, 1 failed, 100 ignored
70%  -- 12775/18249, 12664 passed, 1 failed, 110 ignored
   [ui] tests/ui/process/nofile-limit.rs ... FAILED
80%  -- 14600/18249, 14445 passed, 2 failed, 153 ignored
90%  -- 16425/18249, 16259 passed, 2 failed, 164 ignored
100% -- 18249/18249, 18078 passed, 2 failed, 169 ignored


failures:

---- [ui] tests/ui/explicit-i-suffix.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 1

..... the command and stdout (unchanged)

That seems nice, but I assume with this approach there is no way to search for passed or ignored tests?

I wonder if we could place passed, failed and ignored lists under GH groups (cc #134910) so we can expand/collapse them without losing the ability of searching on passed and ignored tests.

@ranger-ross
Copy link
Contributor Author

I wonder if we could place passed, failed and ignored lists under GH groups (cc #134910) so we can expand/collapse them without losing the ability of searching on passed and ignored tests.

This should be possible but it would require some reworking.
Since GitHub Actions do not support nested ::groups (see my comment) we would need to reorganize the outer Testing <stage> compiletest suite=<suite> mode=<mode> so that we can break it down into multiple groups.


Also I am a bit worried about potentially slowing down the loading time of the logs.
Currently, opening the run the build logs can take anywhere from 2-7 seconds.
If we started logging every test that was passed (that was previously a single . char), we might start running into GitHub performance issues 🥲

@onur-ozkan
Copy link
Contributor

I wonder if we could place passed, failed and ignored lists under GH groups (cc #134910) so we can expand/collapse them without losing the ability of searching on passed and ignored tests.

This should be possible but it would require some reworking. Since GitHub Actions do not support nested ::groups (see my comment) we would need to reorganize the outer Testing <stage> compiletest suite=<suite> mode=<mode> so that we can break it down into multiple groups.

Also I am a bit worried about potentially slowing down the loading time of the logs. Currently, opening the run the build logs can take anywhere from 2-7 seconds. If we started logging every test that was passed (that was previously a single . char), we might start running into GitHub performance issues 🥲

I see, thanks for the explanation. In this case this PR is already better than the status quo. So,

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jan 13, 2025

📌 Commit dc11857 has been approved by onur-ozkan

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 Jan 13, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 13, 2025
Rollup of 3 pull requests

Successful merges:

 - rust-lang#135355 (ci: added test log format for ci)
 - rust-lang#135386 (clean up code related to the rustdoc-js test suite)
 - rust-lang#135391 (bootstrap: Implement conditional `tracing` infra)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit cc19b9b into rust-lang:master Jan 13, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 13, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 13, 2025
Rollup merge of rust-lang#135355 - ranger-ross:improved-ci-logs, r=onur-ozkan

ci: added test log format for ci

This PR adds a new test render format specifically for ci.
The goal as stated in rust-lang#134910 is to make reviewing test failures in CI easier.

See the new test output format in the CI for this PR ([here](https://github.com/rust-lang/rust/actions/runs/12723914643/job/35469515397?pr=135355))

closes rust-lang#134910 cc: `@jyn514`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI Area: Our Github Actions CI 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

put the list of tests run in CI behind a ::group
6 participants