Skip to content

Improve terse test output. #95709

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

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

nnethercote
Copy link
Contributor

The current terse output gives 112 chars per line, which causes
wraparound for people using 100 char wide terminals, which is very
common.

This commit changes it to be exactly 100 wide, which makes the output
look much nicer.

The current terse output gives 112 chars per line, which causes
wraparound for people using 100 char wide terminals, which is very
common.

This commit changes it to be exactly 100 wide, which makes the output
look much nicer.
@rust-highfive
Copy link
Contributor

r? @kennytm

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 6, 2022
@nnethercote
Copy link
Contributor Author

Before:
before

After:
after

I have been seeing this output for years, but had never thought about how it was wrapping, until today when I ran the tests in a wider than usual terminal window and immediately saw how much better it looked.

The only downside of the change is that the increments are now 88 instead of 100. Less intuitive, but luckier :)

@fee1-dead
Copy link
Member

I wonder if instead of using a magic number to determine how many test cases to display in a line, perhaps we could detect the terminal size and change the number of test cases in a row to match?

@nnethercote
Copy link
Contributor Author

I wonder if instead of using a magic number to determine how many test cases to display in a line, perhaps we could detect the terminal size and change the number of test cases in a row to match?

Quite possibly, but that takes us into perfect-is-the-enemy-of-good territory. A follow-up?

@nnethercote
Copy link
Contributor Author

@bors rollup=always

@Dylan-DPC
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 6, 2022

📌 Commit b72a7fb has been approved by Dylan-DPC

@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 6, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 7, 2022
Rollup of 5 pull requests

Successful merges:

 - rust-lang#95185 (Stabilize Stdin::lines.)
 - rust-lang#95626 (Don't cast thread name to an integer for prctl)
 - rust-lang#95709 (Improve terse test output.)
 - rust-lang#95735 (Revert "Mark Location::caller() as #[inline]")
 - rust-lang#95738 (Switch item-info from div to span)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 687e40a into rust-lang:master Apr 7, 2022
@rustbot rustbot added this to the 1.62.0 milestone Apr 7, 2022
@nnethercote nnethercote deleted the improve-terse-test-output branch April 7, 2022 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants