mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 05:16:10 +01:00
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.
This commit is contained in:
parent
1327946785
commit
b86ab20154
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user