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:
Martin Hořeňovský 2020-02-02 23:14:57 +01:00
parent 1327946785
commit b86ab20154
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
1 changed files with 1 additions and 1 deletions

View File

@ -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");