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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Copy link
Member

horenmar commented Sep 27, 2018

I agree, that shouldn't happen by default.

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

@Weeena

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

horenmar commented Sep 27, 2018

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

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 added 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

Merge pull request #1492 from Lotterleben/fix_1394
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