diff options
author | Craig Scott <craig.scott@crascit.com> | 2017-11-29 20:09:30 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-11-29 20:09:58 (GMT) |
commit | b311b8751819ec881824c61ef8de03387ff40c3f (patch) | |
tree | b9729ae8af1b8753e73e857b0562ca7aa67dc82c /Source | |
parent | 5def40891fc1ad0a7d7ba7a16bd11b2d26fa66ab (diff) | |
parent | fbe91dba6a615d799f3ece996ddccdabb819c4dc (diff) | |
download | CMake-b311b8751819ec881824c61ef8de03387ff40c3f.zip CMake-b311b8751819ec881824c61ef8de03387ff40c3f.tar.gz CMake-b311b8751819ec881824c61ef8de03387ff40c3f.tar.bz2 |
Merge topic 'check_fixtures_before_exe_existence'
fbe91dba CTest: Check failed fixture dependencies before test command and args
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !1526
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 99531af..5443494 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -432,8 +432,6 @@ bool cmCTestRunTest::StartTest(size_t total) return false; } - this->ComputeArguments(); - std::vector<std::string>& args = this->TestProperties->Args; this->TestResult.Properties = this->TestProperties; this->TestResult.ExecutionTime = 0; this->TestResult.CompressOutput = false; @@ -444,6 +442,10 @@ bool cmCTestRunTest::StartTest(size_t total) this->TestResult.Name = this->TestProperties->Name; this->TestResult.Path = this->TestProperties->Directory; + // Check for failed fixture dependencies before we even look at the command + // arguments because if we are not going to run the test, the command and + // its arguments are irrelevant. This matters for the case where a fixture + // dependency might be creating the executable we want to run. if (!this->FailedDependencies.empty()) { this->TestProcess = new cmProcess; std::string msg = "Failed test dependencies:"; @@ -459,6 +461,8 @@ bool cmCTestRunTest::StartTest(size_t total) return false; } + this->ComputeArguments(); + std::vector<std::string>& args = this->TestProperties->Args; if (args.size() >= 2 && args[1] == "NOT_AVAILABLE") { this->TestProcess = new cmProcess; std::string msg; |