Skip to content

Use abbreviated output for stestr run in CI#15827

Merged
jakelishman merged 1 commit intoQiskit:mainfrom
mtreinish:abbreviated-output
Mar 17, 2026
Merged

Use abbreviated output for stestr run in CI#15827
jakelishman merged 1 commit intoQiskit:mainfrom
mtreinish:abbreviated-output

Conversation

@mtreinish
Copy link
Copy Markdown
Member

Summary

This commit updates how we use stestr in CI to enable abbreviated output instead of the full output. Our test suite has grown to the point that printing each individual test case as a new line when it completes will overflow the github actions line limit for CI job logs. This makes it very inconvenient to identify the cause of a failure when a test fails because unless it's in the tests that get displayed before github stops displaying it you have to download the full log file (which you can view in the browser still but without the highlighting or direct link support). stestr has a less verbose output mode where it prints a single character for each test. . if a test succeeds, F for failure, etc. Test failures are still printed in full as is the summary footer. It's just the output of tests as they execute which is different. While this doesn't give the same level of diagnostic detail that the full output normally does it will not exceed github's limit. As a small side benefit from the benchmarking I did many years ago stestr actually executes slightly faster in this mode because it doesn't have to write nearly as much to stdout.

Details and comments

This commit updates how we use stestr in CI to enable abbreviated output
instead of the full output. Our test suite has grown to the point that
printing each individual test case as a new line when it completes will
overflow the github actions line limit for CI job logs. This makes it
very inconvenient to identify the cause of a failure when a test fails
because unless it's in the tests that get displayed before github stops
displaying it you have to download the full log file (which you can view
in the browser still but without the highlighting or direct link
support). stestr has a less verbose output mode where it prints a single
character for each test. `.` if a test succeeds, `F` for failure, etc.
Test failures are still printed in full as is the summary footer. It's
just the output of tests as they execute which is different. While this
doesn't give the same level of diagnostic detail that the full output
normally does it will not exceed github's limit. As a small side benefit
from the benchmarking I did many years ago stestr actually executes
slightly faster in this mode because it doesn't have to write nearly as
much to stdout.
@mtreinish mtreinish requested a review from a team as a code owner March 17, 2026 19:49
@mtreinish mtreinish added type: qa Issues and PRs that relate to testing and code quality Changelog: None Do not include in the GitHub Release changelog. labels Mar 17, 2026
@qiskit-bot
Copy link
Copy Markdown
Collaborator

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

Copy link
Copy Markdown
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

Do you want to update the tox config too, or leave that as-is?

@mtreinish
Copy link
Copy Markdown
Member Author

I left it as-is for now I did start there though before pushing. Local terminals don't have the same line limit as GitHub and it's simple enough to do tox -epy -- --abbreviate if you want this output. We also don't set --slowest in the tox config.

@jakelishman jakelishman added this pull request to the merge queue Mar 17, 2026
Merged via the queue into Qiskit:main with commit 9fe42d7 Mar 17, 2026
25 of 26 checks passed
@mtreinish mtreinish deleted the abbreviated-output branch March 18, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: None Do not include in the GitHub Release changelog. type: qa Issues and PRs that relate to testing and code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants