[Cmake-commits] CMake branch, master, updated. v3.10.0-454-gb311b87

Kitware Robot kwrobot at kitware.com
Wed Nov 29 15:15:05 EST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  b311b8751819ec881824c61ef8de03387ff40c3f (commit)
       via  fbe91dba6a615d799f3ece996ddccdabb819c4dc (commit)
      from  5def40891fc1ad0a7d7ba7a16bd11b2d26fa66ab (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b311b8751819ec881824c61ef8de03387ff40c3f
commit b311b8751819ec881824c61ef8de03387ff40c3f
Merge: 5def408 fbe91db
Author:     Craig Scott <craig.scott at crascit.com>
AuthorDate: Wed Nov 29 20:09:30 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Nov 29 15:09:58 2017 -0500

    Merge topic 'check_fixtures_before_exe_existence'
    
    fbe91dba CTest: Check failed fixture dependencies before test command and args
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Acked-by: Brad King <brad.king at kitware.com>
    Merge-request: !1526


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fbe91dba6a615d799f3ece996ddccdabb819c4dc
commit fbe91dba6a615d799f3ece996ddccdabb819c4dc
Author:     Craig Scott <craig.scott at crascit.com>
AuthorDate: Mon Nov 27 22:06:14 2017 +1100
Commit:     Craig Scott <craig.scott at crascit.com>
CommitDate: Wed Nov 29 07:27:20 2017 +1100

    CTest: Check failed fixture dependencies before test command and args

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;
diff --git a/Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in b/Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in
index 5cb0b4e..6b11cff 100644
--- a/Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in
+++ b/Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in
@@ -27,7 +27,11 @@ passTest(two)           # 6
 passTest(cleanupBar)    # 7
 passTest(three)         # 8
 failTest(setupFails)    # 9
-passTest(wontRun)       # 10
+
+# Special case, test executable always missing to verify fixture dependencies
+# are checked before existence of test executable to be run
+add_test(NAME wontRun COMMAND iDoNotExist)  # 10
+
 passTest(cyclicSetup)   # 11
 passTest(cyclicCleanup) # 12
 passTest(cleanupUnused) # 13

-----------------------------------------------------------------------

Summary of changes:
 Source/CTest/cmCTestRunTest.cxx                 |    8 ++++++--
 Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in |    6 +++++-
 2 files changed, 11 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list