[Cmake-commits] [cmake-commits] king committed cmCTest.cxx 1.378 1.379 cmCTest.h 1.124 1.125

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Nov 24 08:59:01 EST 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv32268/Source

Modified Files:
	cmCTest.cxx cmCTest.h 
Log Message:
CTest: Move initial checkout to ctest_start()

In CTest command-driven script mode we support starting without a source
tree.  Previously the ctest_start() command would do some initialization
but could not do anything that required CTestConfig.cmake from the input
source tree.  Later, ctest_update() would run CTEST_CHECKOUT_COMMAND to
create the source tree, and then re-initialize everything.  This
delayed-initialization approach led to many complicated cases of which
only some worked.  For example, the second initialization only worked
correctly in Nightly mode and simply failed for Experimental and
Continuous builds.

A simpler solution is to run CTEST_CHECKOUT_COMMAND during ctest_start()
and then have a single initialization path.  In principle this change in
behavior could break scripts that set the checkout command after
ctest_start() but before ctest_update().  However, the convention we've
always followed has been to set all variables before ctest_start().

See issue #9450.


Index: cmCTest.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.h,v
retrieving revision 1.124
retrieving revision 1.125
diff -C 2 -d -r1.124 -r1.125
*** cmCTest.h	24 Nov 2009 13:58:48 -0000	1.124
--- cmCTest.h	24 Nov 2009 13:58:59 -0000	1.125
***************
*** 24,27 ****
--- 24,28 ----
  class cmCTestCommand;
  class cmCTestScriptHandler;
+ class cmCTestStartCommand;
  
  #define cmCTestLog(ctSelf, logType, msg) \
***************
*** 94,98 ****
     * Initialize and finalize testing
     */
!   bool InitializeFromCommand(cmCTestCommand* command, bool first = false);
    void Finalize();
  
--- 95,99 ----
     * Initialize and finalize testing
     */
!   bool InitializeFromCommand(cmCTestStartCommand* command);
    void Finalize();
  

Index: cmCTest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.cxx,v
retrieving revision 1.378
retrieving revision 1.379
diff -C 2 -d -r1.378 -r1.379
*** cmCTest.cxx	24 Nov 2009 13:58:46 -0000	1.378
--- cmCTest.cxx	24 Nov 2009 13:58:59 -0000	1.379
***************
*** 24,27 ****
--- 24,28 ----
  #include "cmVersionMacros.h"
  #include "cmCTestCommand.h"
+ #include "cmCTestStartCommand.h"
  
  #include "cmCTestBuildHandler.h"
***************
*** 453,463 ****
  
  //----------------------------------------------------------------------
! bool cmCTest::InitializeFromCommand(cmCTestCommand* command, bool first)
  {
-   if ( !first && !this->CurrentTag.empty() )
-     {
-     return true;
-     }
- 
    std::string src_dir
      = this->GetCTestConfiguration("SourceDirectory").c_str();
--- 454,459 ----
  
  //----------------------------------------------------------------------
! bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
  {
    std::string src_dir
      = this->GetCTestConfiguration("SourceDirectory").c_str();
***************
*** 487,501 ****
        }
      }
!   else if ( !first )
      {
      cmCTestLog(this, WARNING, "Cannot locate CTest configuration: "
        << fname.c_str() << std::endl);
      }
-   else
-     {
-     cmCTestLog(this, HANDLER_OUTPUT, "   Cannot locate CTest configuration: "
-       << fname.c_str() << std::endl
-       << "   Delay the initialization of CTest" << std::endl);
-     }
  
    this->SetCTestConfigurationFromCMakeVariable(mf, "NightlyStartTime",
--- 483,491 ----
        }
      }
!   else
      {
      cmCTestLog(this, WARNING, "Cannot locate CTest configuration: "
        << fname.c_str() << std::endl);
      }
  
    this->SetCTestConfigurationFromCMakeVariable(mf, "NightlyStartTime",
***************
*** 519,526 ****
    if ( !this->Initialize(bld_dir.c_str(), true) )
      {
-     if ( this->GetCTestConfiguration("NightlyStartTime").empty() && first)
-       {
-       return true;
-       }
      return false;
      }
--- 509,512 ----



More information about the Cmake-commits mailing list