Skip to content
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

Make test logs readable in CLion #2143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Make test logs readable in CLion #2143

wants to merge 1 commit into from

Conversation

snej
Copy link
Collaborator

@snej snej commented Sep 18, 2024

CLion's test runner seems to treat stderr and std::cerr differently!

  • Output to stderr is written while the test is running.
  • Output to cerr is suppressed while the test is running, then dumped at the end.

LogDomain::defaultCallback() happens to write the timestamp and domain to cerr, but the message itself to stderr. This means the timestamp/domain are missing in the logs, then show up in a big jumble at the end.

I fixed defaultCallback to write everything to cerr. This shouldn't make a difference to anything but CLion.

CLion's test runner seems to treat stderr and std::cerr differently!
- Output to stderr is written while the test is running.
- Output to cerr is suppressed while the test is running, then dumped
  at the end.
LogDomain::defaultCallback() happens to write the timestamp and
domain to cerr, but the message itself to stderr.
I fixed it to write everything to cerr.
@cbl-bot
Copy link

cbl-bot commented Sep 18, 2024

Code Coverage Results:

Type Percentage
branches 65.88
functions 78.75
instantiations 33.19
lines 77.66
regions 73.23

@snej
Copy link
Collaborator Author

snej commented Sep 19, 2024

Looks like Jenkins timed out after an hour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants