diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2019-12-26 21:02:52 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2019-12-27 15:53:52 (GMT) |
commit | b393b32b4bb0bc830edc89df6262ad710cd0a3e2 (patch) | |
tree | 1821b45e3d1e2655e833e755819548addabfa68e /Tests/RunCMake/CTestResourceAllocation | |
parent | 51cc3f1bff2c3637365a9046c2808cd2cf02927b (diff) | |
download | CMake-b393b32b4bb0bc830edc89df6262ad710cd0a3e2.zip CMake-b393b32b4bb0bc830edc89df6262ad710cd0a3e2.tar.gz CMake-b393b32b4bb0bc830edc89df6262ad710cd0a3e2.tar.bz2 |
CTest: Improve error handling when reading resource spec file
Fixes: #20079
Diffstat (limited to 'Tests/RunCMake/CTestResourceAllocation')
-rw-r--r-- | Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx b/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx index 27644af..80db05e 100644 --- a/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx +++ b/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx @@ -285,7 +285,8 @@ static int doVerify(int argc, char const* const* argv) std::set<std::string> testNameSet(testNameList.begin(), testNameList.end()); cmCTestResourceSpec spec; - if (!spec.ReadFromJSONFile(resFile)) { + if (spec.ReadFromJSONFile(resFile) != + cmCTestResourceSpec::ReadFileResult::READ_OK) { std::cout << "Could not read resource spec " << resFile << std::endl; return 1; } |