Skip to content

Commit

Permalink
Add logs to lcov (#685)
Browse files Browse the repository at this point in the history
* Add logs
  • Loading branch information
ladisgin authored Jun 14, 2024
1 parent da6cd74 commit df4818f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/src/KleeRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ void KleeRunner::runKlee(const std::vector<tests::TestMethod> &testMethods,
projectContext.getTestDirAbsPath(),
std::move(prepareTests),
std::move(prepareTotal));

fs::remove_all(kleeOutDir);
}

static void processMethod(MethodKtests &ktestChunk,
Expand Down
6 changes: 6 additions & 0 deletions server/src/coverage/LlvmCoverageTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ LlvmCoverageTool::getCoverageCommands(const std::vector<UnitTest> &testsToLaunch
mergeArguments.emplace_back("-o");
mergeArguments.emplace_back(mainProfdataPath);
auto mergeTask = ShellExecTask::getShellCommandTask(Paths::getLLVMprofdata(), mergeArguments);

LOG_S(MAX) << "Merge coverage info command: " << mergeTask.toString();

fs::path coverageJsonPath = Paths::getCoverageJsonPath(projectContext);
fs::create_directories(coverageJsonPath.parent_path());
std::vector<std::string> exportArguments = { "export" };
Expand Down Expand Up @@ -147,6 +150,9 @@ LlvmCoverageTool::getCoverageCommands(const std::vector<UnitTest> &testsToLaunch
auto exportTask = ShellExecTask::getShellCommandTask(Paths::getLLVMcov(), exportArguments);
exportTask.setLogFilePath(coverageJsonPath);
exportTask.setRetainOutputFile(true);

LOG_S(MAX) << "Export coverage command: " << exportTask.toString();

return { mergeTask, exportTask };
}

Expand Down

0 comments on commit df4818f

Please sign in to comment.