Skip to content

Commit

Permalink
[Coverage] Don't produce a JUnit report.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ImmanuelHaffner committed Apr 26, 2023
1 parent f2ff37b commit 0f41d3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,6 @@ report:coverage:
- .coverage
- .shared
- .build_cache
artifacts:
paths:
- "build/${BUILD_TYPE}/catch.xml"
reports:
junit: "build/${BUILD_TYPE}/catch.xml"
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: on_success
Expand Down Expand Up @@ -600,4 +595,4 @@ publish:github-release:
-H "X-GitHub-Api-Version: 2022-11-28"
-H "Content-Type: application/octet-stream"
"${upload_url}?name=mutable-macos-amd64-${TAG}.zip"
--data-binary "@mutable/mutable-macos-amd64.zip"
--data-binary "@mutable/mutable-macos-amd64.zip"
2 changes: 1 addition & 1 deletion coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ lcov ${LCOV_FLAGS} --zerocounters --directory src --directory unittest
lcov ${LCOV_FLAGS} --capture --initial --directory src --directory unittest --output-file base.info
# lcov ${LCOV_FLAGS} --capture --initial --output-file unittest.base
# Run tests
bin/unittest --durations yes --reporter junit --out catch.xml '[core]'
bin/unittest --reporter compact '[core]'
# Capture lcov counters and generate report
lcov ${LCOV_FLAGS} --capture --directory src --directory unittest --output-file test.info
# lcov ${LCOV_FLAGS} --capture --directory unittest --output-file unittest.capture
Expand Down

0 comments on commit 0f41d3b

Please sign in to comment.