summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestRunTest.cxx
diff options
context:
space:
mode:
authorZsolt Parragi <zsolt.parragi@cancellar.hu>2018-11-06 19:40:18 (GMT)
committerBrad King <brad.king@kitware.com>2019-02-08 19:49:20 (GMT)
commit440b08e4f0f59f47b53eb8310832bd4a1b1eb912 (patch)
tree892129074956fe8006993048ead0067932a40266 /Source/CTest/cmCTestRunTest.cxx
parenta3ec65c3e8758c5d70743a0241fd6838879fd950 (diff)
downloadCMake-440b08e4f0f59f47b53eb8310832bd4a1b1eb912.zip
CMake-440b08e4f0f59f47b53eb8310832bd4a1b1eb912.tar.gz
CMake-440b08e4f0f59f47b53eb8310832bd4a1b1eb912.tar.bz2
CTest: Represent process exit codes as 64-bit signed integer
Exit code constants on Windows, such as `STATUS_NO_MEMORY` do not fit in a 32-bit signed integer type. They do fit in an unsigned 32-bit type, but for compatibility with UNIX semantics we treat exit codes as signed. Use a 64-bit signed integer to handle both.
Diffstat (limited to 'Source/CTest/cmCTestRunTest.cxx')
-rw-r--r--Source/CTest/cmCTestRunTest.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index 7f081ef..5183c6f 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -14,6 +14,7 @@
#include "cmsys/RegularExpression.hxx"
#include <chrono>
#include <cmAlgorithms.h>
+#include <cstdint>
#include <cstring>
#include <iomanip>
#include <ratio>
@@ -143,7 +144,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
if (res != cmProcess::State::Expired) {
this->TimeoutIsForStopTime = false;
}
- int retVal = this->TestProcess->GetExitValue();
+ std::int64_t retVal = this->TestProcess->GetExitValue();
bool forceFail = false;
bool skipped = false;
bool outputTestErrorsToConsole = false;