Commit 5aaaee5e authored by Betsy McPhail's avatar Betsy McPhail
Browse files

ctest_memcheck: Change failure to find log file from error to warning

Sanitizers do not create a log file when no defects are found. Therefore,
it is currently impossible for ctest_memcheck to set both
`CAPTURE_CMAKE_ERROR` and `RETURN_VALUE` to zero.


With defects, `CAPTURE_CMAKE_ERROR`=0 and `RETURN_VALUE`=-1, as expected.

With no defects, `CAPTURE_CMAKE_ERROR`=-1 and `RETURN_VALUE`=0.
parent ca7507ce
......@@ -1087,7 +1087,7 @@ void cmCTestMemCheckHandler::TestOutputFileNames(
g.FindFiles(ofile);
if (g.GetFiles().empty()) {
std::string log = "Cannot find memory tester output file: " + ofile;
cmCTestLog(this->CTest, ERROR_MESSAGE, log << std::endl);
cmCTestLog(this->CTest, WARNING, log << std::endl);
ofile.clear();
} else {
files = g.GetFiles();
......@@ -1095,7 +1095,7 @@ void cmCTestMemCheckHandler::TestOutputFileNames(
}
} else if (!cmSystemTools::FileExists(ofile)) {
std::string log = "Cannot find memory tester output file: " + ofile;
cmCTestLog(this->CTest, ERROR_MESSAGE, log << std::endl);
cmCTestLog(this->CTest, WARNING, log << std::endl);
ofile.clear();
}
files.push_back(std::move(ofile));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment