summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestTestHandler.cxx
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2018-03-04 06:27:09 (GMT)
committerCraig Scott <craig.scott@crascit.com>2018-03-08 09:07:14 (GMT)
commite60e4dfc88252aaec53f0d832508d41dff6165fd (patch)
tree5903e9e8f2eb57780d47a21d83f282f9cee11741 /Source/CTest/cmCTestTestHandler.cxx
parente654622aee22655c418a9c663fad79243ca0c819 (diff)
downloadCMake-e60e4dfc88252aaec53f0d832508d41dff6165fd.zip
CMake-e60e4dfc88252aaec53f0d832508d41dff6165fd.tar.gz
CMake-e60e4dfc88252aaec53f0d832508d41dff6165fd.tar.bz2
cmWorkingDirectory: Check success of current dir changes
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 84d8926..7ea8fc3 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -6,6 +6,7 @@
#include <cmsys/Base64.h>
#include <cmsys/Directory.hxx>
#include <cmsys/RegularExpression.hxx>
+#include <cstring>
#include <functional>
#include <iomanip>
#include <iterator>
@@ -14,7 +15,6 @@
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <time.h>
#include "cmAlgorithms.h"
@@ -85,6 +85,11 @@ bool cmCTestSubdirCommand::InitialPass(std::vector<std::string> const& args,
bool readit = false;
{
cmWorkingDirectory workdir(fname);
+ if (workdir.Failed()) {
+ this->SetError("Failed to change directory to " + fname + " : " +
+ std::strerror(workdir.GetLastResult()));
+ return false;
+ }
const char* testFilename;
if (cmSystemTools::FileExists("CTestTestfile.cmake")) {
// does the CTestTestfile.cmake exist ?