Skip to content

Commit

Permalink
output: Correct check-for-more-than one coveree for [merged] producing
Browse files Browse the repository at this point in the history
Kcov now has a symlink to the current coveree, so it thinks that there
are more than one runs with only one binary after the second invocation.
  • Loading branch information
Simon Kagstrom committed Jun 15, 2018
1 parent 54236ce commit 9db5fa5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,13 @@ unsigned int countMetadata()

// Count metadata directories
for (de = ::readdir(dir); de; de = ::readdir(dir)) {
std::string cur = base + de->d_name + "/metadata";
std::string name = de->d_name;
std::string cur = base + name + "/metadata";
std::string binaryName = conf.keyAsString("binary-name");

// ... except for the current coveree
if (de->d_name == conf.keyAsString("binary-name"))
// ... except for the current coveree and coveree.CHECKSUM
if (binaryName == name ||
(name.size() > binaryName.size() && name.find(binaryName) == 0 && name[binaryName.size()] == '.'))
continue;

DIR *metadataDir;
Expand Down

0 comments on commit 9db5fa5

Please sign in to comment.