[CMake] CTest_Update not updating to head revision (svn)

Luke Kucalaba lkucalaba at dsci.com
Fri May 7 12:40:19 EDT 2010


I hadn't heard any suggestions from anyone so I dove in the CTest source
code (cmake-2.8.1) and found the answer.  I recommend that this
information below about how ctest_update is implemented (at least for
subversion) should either be logged in the stdout stream (please show
actual svn command) or be included in the documentation somewhere.  This
issue had been a problem for us for over a week and we wasted a lot of
time trying to figure it out.

 

In cmCTestSVN::UpdateImpl()

 

  // Specify the start time for nightly testing.

  if(this->CTest->GetTestModel() == cmCTest::NIGHTLY)

    {

    args.push_back("-r{" + this->GetNightlyTime() + " +0000}");

    }

 

So according to this code, CTest uses the nightly build start time
variable CTEST_NIGHTLY_START_TIME to svn update the source directory to
the revision at that time.  We also use CTest for on-demand experimental
builds, which svn updated with no problems, leaving us very confused.

 

I found a related CDash mailing list posting from 2008 that pretty much
threw us for another red herring:

http://public.kitware.com/pipermail/cdash/2008-May/000137.html

 

"CDash doesn't use the CTEST_NIGHTLY_START_TIME anymore, since it's a 
server side option.
 
You can see how to change the nightly start time of your dashboard from 
CDash project's page:
http://public.kitware.com/Wiki/CDash:Administration#Creating_a_project
 
Let us know if you still have any issues,
Julien"

 

This information is not correct.  The client-side
CTEST_NIGHTLY_START_TIME apparently _is_ used to determine the revision
number when svn updating.

 

Luke

 

________________________________

From: Luke Kucalaba 
Sent: Tuesday, May 04, 2010 11:16 AM
To: cmake at cmake.org
Subject: CTest_Update not updating to head revision (svn)

 

Hi, I have a question about using CTest for automatic nightly builds.
Our company has been using CMake/CTest/CDash tools for about a year now
with no problems when the nightly build time was at 1am.  We moved the
nightly build time to 9pm because now we have a lot more software to
build and many more compilers.  We changed all the projects nightly
start time (on the CDash server) to 6pm to ensure the nightly builds
show up for the next day.  

 

However the problem we are seeing is that CTest_Update does not seem to
update to the head revision anymore, but rather seems to update to the
previous day's revision?  I have found a few posts suggesting that the
variable CTEST_NIGHTLY_START_TIME is not used anymore?  Is this true?
All of our ctest config files had set this value to midnight because I
think it was required in older versions of CMake/CTest?  Is it possible
that this old behavior/capability of using this client-side variable is
still present and is causing our svn update problem?  From the output
log of the svn update command it appears that the nightly start time is
affecting the svn update operation to update to yesterday's revision.
Can I just remove the Set (CTEST_NIGHTLY_START_TIME) command from our
client update ctest scripts to fix this problem?  Will older versions of
CMake require this variable to work?

 

Below is the log output of the CTest/CDash update script we use to
recursively update our repositories.  You can see where the nightly
start time is set, and how the old revision number is newer than the new
revision number.

 

SetCTestConfiguration:SourceDirectory:N:/dsci/repo/common/scripts/CDashB
uilder
SetCTestConfiguration:BuildDirectory:N:/dsci/repo/common/scripts/CDashBu
ilder/ctest
Run dashboard with model Nightly
   Source directory: N:/dsci/repo/common/scripts/CDashBuilder
   Build directory: N:/dsci/repo/common/scripts/CDashBuilder/ctest
   Reading ctest configuration file:
N:/dsci/repo/common/scripts/CDashBuilder/CTestConfig.cmake
SetCTestConfigurationFromCMakeVariable:NightlyStartTime:CTEST_NIGHTLY_ST
ART_TIMESetCTestConfiguration:NightlyStartTime:00:00:00 EDT
SetCTestConfigurationFromCMakeVariable:Site:CTEST_SITESetCTestConfigurat
ion:Site:192.168.15.187
SetCTestConfigurationFromCMakeVariable:BuildName:CTEST_BUILD_NAMESetCTes
tConfiguration:BuildName:WindowsXP-N__dsci_repo_common_ext_dll
   Site: 192.168.15.187
   Build name: WindowsXP-N__dsci_repo_common_ext_dll
Determine Nightly Start Time
   Specified time: 00:00:00 EDT
   Use Nightly tag: 20100503-0400
SetCTestConfiguration:SourceDirectory:N:/dsci/repo/common/ext/dll
SetCTestConfigurationFromCMakeVariable:SVNCommand:CTEST_SVN_COMMANDSetCT
estConfiguration:SVNCommand:svn
SetCTestConfiguration:BuildDirectory:N:/dsci/repo/common/scripts/CDashBu
ilder/ctest
SetCTestConfiguration:SourceDirectory:N:/dsci/repo/common/ext/dll
   Updating the repository: N:/dsci/repo/common/ext/dll
   Use SVN repository type
   Old revision of repository is: 27078
Determine Nightly Start Time
   Specified time: 00:00:00 EDT
   New revision of repository is: 27054
   Gathering version information (one . per revision):
    
   Found 6 updated files

 

 

Any advice/suggestions you could offer would be greatly appreciated.
Thanks!

 

Sincerely, 

Luke Kucalaba

Senior Software Engineer

D&S Consultants Inc

Columbus, Ohio

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100507/0352b2b4/attachment-0001.htm>


More information about the CMake mailing list