Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

OpenCppCoverage skips coverage of non-source directories

Previously, we would collect coverage data for all source files in
Catch2's directory, including tests and examples, and we would then
ask codecov.io to ignore those. With this change, OpenCppCoverage
only collects coverage data for source files in the `src/` directory.
This cuts the size of the coverage report in half, and also speeds
up the coverage collection.
Commit
b86ab201541d1e0e10db647cc0f64ab9fc112624
Author
Martin Hořeňovský ·
Parents
1327946785cd

Files · Download .tar.gz

Changes

 tools/misc/coverage-helper.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/misc/coverage-helper.cpp b/tools/misc/coverage-helper.cpp
index a31e927f..9e7a8ca4 100644
--- a/tools/misc/coverage-helper.cpp
+++ b/tools/misc/coverage-helper.cpp
@@ -95,7 +95,7 @@ int exec_cmd(std::string const& cmd, int log_num, std::string const& path) {
 
     // cmd has already been escaped outside this function.
     auto real_cmd = "OpenCppCoverage --export_type binary:cov-report" + std::to_string(log_num)
-        + ".bin --quiet " + "--sources " + escape_arg(path) + " --cover_children -- " + cmd;
+        + ".bin --quiet " + "--sources " + escape_arg(path) + "\\src" + " --cover_children -- " + cmd;
     std::cout << "=== Marker ===: Cmd: " << real_cmd << '\n';
     auto pipe = _popen(real_cmd.c_str(), "r");