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.
This commit is contained in:
Betsy McPhail
2018-08-28 16:45:49 -04:00
parent ca7507cebc
commit 5aaaee5e9e
11 changed files with 2 additions and 12 deletions

View File

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