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

Show stdout and stderr output regardless of test result #9

Closed
eerimoq opened this issue Oct 19, 2019 · 5 comments
Closed

Show stdout and stderr output regardless of test result #9

eerimoq opened this issue Oct 19, 2019 · 5 comments

Comments

@eerimoq
Copy link
Contributor

eerimoq commented Oct 19, 2019

Hello,

I often want to see all stdout and stderr output regardless of the test result. There are two reasons; I like printf-debugging and I want to see the output from the project's logging module. Would it be possible to add support for it somehow? Maybe write the output to a file, maybe to the terminal, maybe something else. Maybe a command line argument to enable it?

@vberlier
Copy link
Owner

Hmm... depending on the use-case I can see this being implemented a bit like the ONLY and SKIP modifiers. It wouldn't be too hard to add an INSPECT modifier that displays the output of a specific test even when it succeeds.

TEST(example, INSPECT)
{
    printf("hello\n");
}

Otherwise, if it's about generating a dump of all the outputs of your tests on every run it means that I'd need to setup some sort of global configuration and make it possible to enable the option with a command-line argument or an environment variable depending on whether the user defined a custom main function or not.

@eerimoq
Copy link
Contributor Author

eerimoq commented Oct 20, 2019

I would prefer a global configuration to easily get all output of the whole suite.

@vberlier
Copy link
Owner

Should the dump be machine-readable? Like a big json file?

@eerimoq
Copy link
Contributor Author

eerimoq commented Oct 20, 2019

The raw, unmodified, output is what I am looking for.

@eerimoq eerimoq closed this as completed Mar 29, 2020
@blitzbohne
Copy link

@vberlier Is there anyway to have this work? To simply have stdout and stderr being printed as expected?

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

No branches or pull requests

3 participants