diff options
author | Craig Scott <craig.scott@crascit.com> | 2019-12-29 00:02:48 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-12-29 00:03:00 (GMT) |
commit | da9cbeb3e93a747afd6880a09e99f80988de097b (patch) | |
tree | 0655b52ed3f524b192840c2e099c53bd093ca50c /Source/CTest/cmCTestTestHandler.cxx | |
parent | 35cc607249252bd0ef813a4a235eb98d6bf5b370 (diff) | |
parent | b393b32b4bb0bc830edc89df6262ad710cd0a3e2 (diff) | |
download | CMake-da9cbeb3e93a747afd6880a09e99f80988de097b.zip CMake-da9cbeb3e93a747afd6880a09e99f80988de097b.tar.gz CMake-da9cbeb3e93a747afd6880a09e99f80988de097b.tar.bz2 |
Merge topic 'ctest-resource-allocation-spec-message'
b393b32b4b CTest: Improve error handling when reading resource spec file
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4162
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 37c7154..e70bc5a 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -537,9 +537,13 @@ bool cmCTestTestHandler::ProcessOptions() val = this->GetOption("ResourceSpecFile"); if (val) { this->UseResourceSpec = true; - if (!this->ResourceSpec.ReadFromJSONFile(val)) { + auto result = this->ResourceSpec.ReadFromJSONFile(val); + if (result != cmCTestResourceSpec::ReadFileResult::READ_OK) { cmCTestLog(this->CTest, ERROR_MESSAGE, - "Could not read resource spec file: " << val << std::endl); + "Could not read/parse resource spec file " + << val << ": " + << cmCTestResourceSpec::ResultToString(result) + << std::endl); return false; } } |