summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBetsy McPhail <betsy.mcphail@kitware.com>2018-08-28 20:45:49 (GMT)
committerBetsy McPhail <betsy.mcphail@kitware.com>2018-08-28 20:45:49 (GMT)
commit5aaaee5e9e67b637c3e34346715377145bc08a97 (patch)
treee8c7143fb6a422c7573e750856c3c6fde836441f
parentca7507cebc74fe4af3660cf85c72070c3f95a9ba (diff)
downloadCMake-5aaaee5e9e67b637c3e34346715377145bc08a97.zip
CMake-5aaaee5e9e67b637c3e34346715377145bc08a97.tar.gz
CMake-5aaaee5e9e67b637c3e34346715377145bc08a97.tar.bz2
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.
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.cxx4
-rw-r--r--Tests/RunCMake/ctest_memcheck/DummyAddressLeakSanitizer-result.txt1
-rw-r--r--Tests/RunCMake/ctest_memcheck/DummyAddressSanitizer-result.txt1
-rw-r--r--Tests/RunCMake/ctest_memcheck/DummyLeakSanitizer-result.txt1
-rw-r--r--Tests/RunCMake/ctest_memcheck/DummyLeakSanitizerPrintDefects-result.txt1
-rw-r--r--Tests/RunCMake/ctest_memcheck/DummyMemorySanitizer-result.txt1
-rw-r--r--Tests/RunCMake/ctest_memcheck/DummyPurifyNoLogFile-result.txt1
-rw-r--r--Tests/RunCMake/ctest_memcheck/DummyThreadSanitizer-result.txt1
-rw-r--r--Tests/RunCMake/ctest_memcheck/DummyUndefinedBehaviorSanitizer-result.txt1
-rw-r--r--Tests/RunCMake/ctest_memcheck/DummyValgrindCustomOptions-result.txt1
-rw-r--r--Tests/RunCMake/ctest_memcheck/DummyValgrindNoLogFile-result.txt1
11 files changed, 2 insertions, 12 deletions
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index 04d1839..9c9532a 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -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));
diff --git a/Tests/RunCMake/ctest_memcheck/DummyAddressLeakSanitizer-result.txt b/Tests/RunCMake/ctest_memcheck/DummyAddressLeakSanitizer-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/ctest_memcheck/DummyAddressLeakSanitizer-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/ctest_memcheck/DummyAddressSanitizer-result.txt b/Tests/RunCMake/ctest_memcheck/DummyAddressSanitizer-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/ctest_memcheck/DummyAddressSanitizer-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/ctest_memcheck/DummyLeakSanitizer-result.txt b/Tests/RunCMake/ctest_memcheck/DummyLeakSanitizer-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/ctest_memcheck/DummyLeakSanitizer-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/ctest_memcheck/DummyLeakSanitizerPrintDefects-result.txt b/Tests/RunCMake/ctest_memcheck/DummyLeakSanitizerPrintDefects-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/ctest_memcheck/DummyLeakSanitizerPrintDefects-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/ctest_memcheck/DummyMemorySanitizer-result.txt b/Tests/RunCMake/ctest_memcheck/DummyMemorySanitizer-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/ctest_memcheck/DummyMemorySanitizer-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/ctest_memcheck/DummyPurifyNoLogFile-result.txt b/Tests/RunCMake/ctest_memcheck/DummyPurifyNoLogFile-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/ctest_memcheck/DummyPurifyNoLogFile-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/ctest_memcheck/DummyThreadSanitizer-result.txt b/Tests/RunCMake/ctest_memcheck/DummyThreadSanitizer-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/ctest_memcheck/DummyThreadSanitizer-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/ctest_memcheck/DummyUndefinedBehaviorSanitizer-result.txt b/Tests/RunCMake/ctest_memcheck/DummyUndefinedBehaviorSanitizer-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/ctest_memcheck/DummyUndefinedBehaviorSanitizer-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/ctest_memcheck/DummyValgrindCustomOptions-result.txt b/Tests/RunCMake/ctest_memcheck/DummyValgrindCustomOptions-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/ctest_memcheck/DummyValgrindCustomOptions-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/ctest_memcheck/DummyValgrindNoLogFile-result.txt b/Tests/RunCMake/ctest_memcheck/DummyValgrindNoLogFile-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/ctest_memcheck/DummyValgrindNoLogFile-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)