-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Test failed using the JUnit reporter but not using the console or xml reporter #1801
Comments
We're seeing very similar results for some build configs for all reporters except console. |
This issue still happens using Catch2 v2.13.2 and the Junit reporter but only under macOS 10.15 with Xcode 11.7. I have not anymore this issue under Windows and Visual Studio 2019. I tried to narrowed the problem and I have this assertion failure:
This assertion failure was also mentioned in issues #1967 and #1210 The workaround found to suppress the crash is to comment the checks with the (un)equal operator for the
|
I just hit this as well, using a REQUIRE inside of a test listener. Removing the REQUIRE from the test listener fixes the issue (only on Mac though; does not happen on Windows/Visual Studio 2017). I'll try to make a min repro if I have time. |
I was able to repro this minimally with this:
If you build this on Linux with GCC (I was using gcc version 9.3.0), and run with "-r junit", it will fail with:
If you run without the flags, you get:
|
The `unittest` binary crashes with ``` unittest: /var/lib/gitlab-runner/builds/yS6csq8A/0/bigdata/mutable/mutable/third-party/catch2/include/catch2/catch.hpp:5918: virtual void Catch::CumulativeReporterBase<Catch::JunitReporter>::testCaseEnded(const Catch::TestCaseStats &) [DerivedT = Catch::JunitReporter]: Assertion `m_sectionStack.size() == 0' failed. ``` This error seems to be related to the Catch 2 JUnit reporter. See catchorg/Catch2#1801 and catchorg/Catch2#1967. To remedy this problem, we simply don't use produce a report anymore. It was never used, anyway.
Describe the bug
When I run the following test, the last check
CHECK( i == 3 )
fails when I use the JUnit reporter (passing the-r junit
argument to the binary), but passes when I use the xml or console reporter.Expected behavior
The test should pass for all reporters
Reproduction steps
.DS_Store
file (or you can adapt the test in consequence)-r console
(pass)-r xml
(pass)-r junit
(fail)Platform information:
Supplementary information:
I discovered this problem does not happen when I comment the first CHECK command.
The following test does not fail with the JUnit reporter
The text was updated successfully, but these errors were encountered: