diff options
author | Brad King <brad.king@kitware.com> | 2009-11-24 13:58:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-11-24 13:58:59 (GMT) |
commit | e1548142fbb582d02f2386ff8085e6372f7f3ffd (patch) | |
tree | 3e65a470050c1e75a2f28a0a9d11371c828d2633 /Source/CTest/cmCTestUpdateCommand.cxx | |
parent | c2ba35787e4f710d7424c30c61efd1d386d0d619 (diff) | |
download | CMake-e1548142fbb582d02f2386ff8085e6372f7f3ffd.zip CMake-e1548142fbb582d02f2386ff8085e6372f7f3ffd.tar.gz CMake-e1548142fbb582d02f2386ff8085e6372f7f3ffd.tar.bz2 |
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.
Diffstat (limited to 'Source/CTest/cmCTestUpdateCommand.cxx')
-rw-r--r-- | Source/CTest/cmCTestUpdateCommand.cxx | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/Source/CTest/cmCTestUpdateCommand.cxx b/Source/CTest/cmCTestUpdateCommand.cxx index 6dbe815..571745d 100644 --- a/Source/CTest/cmCTestUpdateCommand.cxx +++ b/Source/CTest/cmCTestUpdateCommand.cxx @@ -56,14 +56,6 @@ cmCTestGenericHandler* cmCTestUpdateCommand::InitializeHandler() this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, "HGUpdateOptions", "CTEST_HG_UPDATE_OPTIONS"); - const char* initialCheckoutCommand - = this->Makefile->GetDefinition("CTEST_CHECKOUT_COMMAND"); - if ( !initialCheckoutCommand ) - { - initialCheckoutCommand = - this->Makefile->GetDefinition("CTEST_CVS_CHECKOUT"); - } - cmCTestGenericHandler* handler = this->CTest->GetInitializedHandler("update"); if ( !handler ) @@ -78,24 +70,6 @@ cmCTestGenericHandler* cmCTestUpdateCommand::InitializeHandler() return 0; } handler->SetOption("SourceDirectory", source_dir.c_str()); - if ( initialCheckoutCommand ) - { - handler->SetOption("InitialCheckout", initialCheckoutCommand); - } - if ( (!cmSystemTools::FileExists(source_dir.c_str()) || - !cmSystemTools::FileIsDirectory(source_dir.c_str())) - && !initialCheckoutCommand ) - { - cmOStringStream str; - str << "cannot find source directory: " << source_dir.c_str() << "."; - if ( !cmSystemTools::FileExists(source_dir.c_str()) ) - { - str << " Looks like it is not checked out yet. Please specify " - "CTEST_CHECKOUT_COMMAND."; - } - this->SetError(str.str().c_str()); - return 0; - } return handler; } |