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

If a specific section is specified, actually two test runs are carried out #1394

Closed
Weeena opened this issue Sep 24, 2018 · 3 comments · Fixed by #1492
Closed

If a specific section is specified, actually two test runs are carried out #1394

Weeena opened this issue Sep 24, 2018 · 3 comments · Fixed by #1492
Labels

Comments

@Weeena
Copy link

Weeena commented Sep 24, 2018

Description

If I like a test in a specific section to be run, I can do this with this command:
./MyExe Test -c sa

Surprisingly, this causes two test runs:

  1. Test "Test" with section "sa"
  2. Test "Test" without any sections

Is there a reason for the second empty test run? In my application where the initialisation for the test case is lengthy this behaviour is inconvenient.

Steps to reproduce

Put some log output in the test case "Test" outside any sections.

@horenmar
Copy link
Member

I agree, that shouldn't happen by default.

Is section "sa" failing? (basically, does it run into the same problem #1389 does?)

@Weeena
Copy link
Author

Weeena commented Sep 27, 2018

No, section "sa" is not failing. (I saw issue #1389 before I opened this new issue and, at first sight, it seemed similar. But because "sa" was not failing I thought this would be something different.)

@horenmar
Copy link
Member

Then this is a bug, the first run should provide all the information we need to avoid doing a second one.

@horenmar horenmar added Bug and removed Possible bug labels Sep 27, 2018
Lotterleben pushed a commit to Lotterleben/Catch2 that referenced this issue Jan 8, 2019
Lotterleben pushed a commit to Lotterleben/Catch2 that referenced this issue Jan 8, 2019
Lotterleben pushed a commit to Lotterleben/Catch2 that referenced this issue Jan 9, 2019
horenmar pushed a commit to Lotterleben/Catch2 that referenced this issue Jan 18, 2019
horenmar added a commit to Lotterleben/Catch2 that referenced this issue Jan 18, 2019
horenmar added a commit that referenced this issue Jan 18, 2019
fix #1394: avoid superfluous re-run when specific section is selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants