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

not able to reproduce --list-test-names-only exactly in v3 #2051

Closed
bowie7070 opened this issue Oct 12, 2020 · 3 comments
Closed

not able to reproduce --list-test-names-only exactly in v3 #2051

bowie7070 opened this issue Oct 12, 2020 · 3 comments

Comments

@bowie7070
Copy link

bowie7070 commented Oct 12, 2020

In catch2 v2 we have --list-test-names-only which prints the test names matching a filter.

According to the notes for v3

--list-test-names-only has been removed (#1190)
You should use verbosity-modifiers for --list-tests instead

However -l --verbosity quiet does not produce the same output. It also includes before the first test case:

All available test cases:

And after the last test case:

x test cases

I would like -l --verbosity quiet to only print the test names. That is reproduce the behaviour of --list-test-names-only.

The motivation for this is similar to the comment on the issue relating to the removal of the flag. I want to be able to get a list of only test case names consumable by -f or passable as a command line argument as in xargs.

#1190 (comment)

Please note that the blank line is also problematic. To be specific I have a script for running tests in parallel and it does:

$exe --list-test-names-only --order rand --rng-seed time "$@" |
parallel --bar --halt now,fail=1 -j 20 $exe "{}" ">" "tmp$$/{}.out"

Parallel reads lines from stdin and executes the catch program ($exe) with the given lines. When it hits the blank line it tries to run all tests again.

@horenmar
Copy link
Member

Okay, should be fixed.

@bowie7070
Copy link
Author

bowie7070 commented Oct 30, 2020 via email

@horenmar
Copy link
Member

Yeah, the checked-in amalgamated file should behave just like single header used to, that is, it is only updated upon release. You can update it with tools/scripts/generateAmalgamatedFiles.py.

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

2 participants