diff options
author | Brad King <brad.king@kitware.com> | 2018-03-09 12:43:39 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-03-09 12:43:54 (GMT) |
commit | e11410bb0c66152c6fafb56d40c9328abaa7a1ab (patch) | |
tree | 14113116753b98ab5b0932ab87c3092756d6f295 /Source/CTest/cmCTestTestHandler.cxx | |
parent | 44fc5729637330e463666f97ba952dcb6f2e9506 (diff) | |
parent | 5901699672cce82d9622a02c4c7d22889029ee0c (diff) | |
download | CMake-e11410bb0c66152c6fafb56d40c9328abaa7a1ab.zip CMake-e11410bb0c66152c6fafb56d40c9328abaa7a1ab.tar.gz CMake-e11410bb0c66152c6fafb56d40c9328abaa7a1ab.tar.bz2 |
Merge topic 'cmWorkingDirectory_success_checking'
5901699672 cmDepends: Remove attempt to change directory that always fails
e60e4dfc88 cmWorkingDirectory: Check success of current dir changes
e654622aee Tests: Add --build-and-test test case
a865f0beb2 Tests: Confirm test working dir set successfully
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1817
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index d1affd4..cbaf984 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 ? |