diff options
author | Brad King <brad.king@kitware.com> | 2019-01-21 12:50:54 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-01-21 12:51:08 (GMT) |
commit | 7e5f9b192e9c3ed7130e1e52b7f9d3243f51e2ab (patch) | |
tree | ef3e3526aa8f8c1ab1c433f55870375e3ee7a01b /Source | |
parent | 15fe5c4c9d90aa03e146fe8b9585e82c4f3b5ffe (diff) | |
parent | cae9d2a61afea3948c8dfaf1f7dbc39ebaa71055 (diff) | |
download | CMake-7e5f9b192e9c3ed7130e1e52b7f9d3243f51e2ab.zip CMake-7e5f9b192e9c3ed7130e1e52b7f9d3243f51e2ab.tar.gz CMake-7e5f9b192e9c3ed7130e1e52b7f9d3243f51e2ab.tar.bz2 |
Merge topic 'ctest-json-polish'
cae9d2a61a CTest: Teach --show-only= to reject unknown values
7370b02c36 CTest: Teach --show-only=json-v1 to filter out not-available tests
62fec84ad7 Tests: Fix RunCMake.CTestCommandLine case when no python is found
75a7a23746 Tests: Rename RunCMake.CTestCommandLine show-only test cases
fecbc87608 Tests: Fix RunCMake.CTestCommandLine to actually check json-v1
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2812
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 5 | ||||
-rw-r--r-- | Source/cmCTest.cxx | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 8867323..320647a 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -1039,6 +1039,11 @@ void cmCTestMultiProcessHandler::PrintOutputAsJson() testRun.SetTestProperties(&p); testRun.ComputeArguments(); + // Skip tests not available in this configuration. + if (p.Args.size() >= 2 && p.Args[1] == "NOT_AVAILABLE") { + continue; + } + Json::Value testInfo = DumpCTestInfo(testRun, p, backtraceGraph); tests.append(testInfo); } diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index ded2525..4959288 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1944,6 +1944,9 @@ bool cmCTest::HandleCommandLineArguments(size_t& i, this->Quiet = true; this->OutputAsJson = true; this->OutputAsJsonVersion = 1; + } else if (format != "human") { + errormsg = "'--show-only=' given unknown value '" + format + "'"; + return false; } } |