[Cmake-commits] [cmake-commits] king committed cmCTestUpdateHandler.cxx 1.59 1.60 cmCTestVC.cxx 1.3 1.4 cmCTestVC.h 1.3 1.4
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Feb 24 12:50:50 EST 2009
Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv26115/Source/CTest
Modified Files:
cmCTestUpdateHandler.cxx cmCTestVC.cxx cmCTestVC.h
Log Message:
ENH: Factor out nightly start time computation
Move generation of the nightly start time string from
cmCTestUpdateHandler::ProcessHandler into cmCTestVC.
Index: cmCTestUpdateHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestUpdateHandler.cxx,v
retrieving revision 1.59
retrieving revision 1.60
diff -C 2 -d -r1.59 -r1.60
*** cmCTestUpdateHandler.cxx 24 Feb 2009 17:50:15 -0000 1.59
--- cmCTestUpdateHandler.cxx 24 Feb 2009 17:50:48 -0000 1.60
***************
*** 365,380 ****
if ( this->CTest->GetTestModel() == cmCTest::NIGHTLY )
{
! struct tm* t = this->CTest->GetNightlyTime(
! this->CTest->GetCTestConfiguration("NightlyStartTime"),
! this->CTest->GetTomorrowTag());
! char current_time[1024];
! sprintf(current_time, "%04d-%02d-%02d %02d:%02d:%02d",
! t->tm_year + 1900,
! t->tm_mon + 1,
! t->tm_mday,
! t->tm_hour,
! t->tm_min,
! t->tm_sec);
! std::string today_update_date = current_time;
// TODO: SVN
--- 365,369 ----
if ( this->CTest->GetTestModel() == cmCTest::NIGHTLY )
{
! std::string today_update_date = vc->GetNightlyTime();
// TODO: SVN
Index: cmCTestVC.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestVC.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** cmCTestVC.h 24 Feb 2009 17:50:15 -0000 1.3
--- cmCTestVC.h 24 Feb 2009 17:50:48 -0000 1.4
***************
*** 40,43 ****
--- 40,46 ----
void SetSourceDirectory(std::string const& dir);
+ /** Get the date/time specification for the current nightly start time. */
+ std::string GetNightlyTime();
+
/** Perform cleanup operations on the work tree. */
void Cleanup();
Index: cmCTestVC.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestVC.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** cmCTestVC.cxx 24 Feb 2009 17:50:15 -0000 1.3
--- cmCTestVC.cxx 24 Feb 2009 17:50:48 -0000 1.4
***************
*** 73,76 ****
--- 73,94 ----
//----------------------------------------------------------------------------
+ std::string cmCTestVC::GetNightlyTime()
+ {
+ // Get the nightly start time corresponding to the current dau.
+ struct tm* t = this->CTest->GetNightlyTime(
+ this->CTest->GetCTestConfiguration("NightlyStartTime"),
+ this->CTest->GetTomorrowTag());
+ char current_time[1024];
+ sprintf(current_time, "%04d-%02d-%02d %02d:%02d:%02d",
+ t->tm_year + 1900,
+ t->tm_mon + 1,
+ t->tm_mday,
+ t->tm_hour,
+ t->tm_min,
+ t->tm_sec);
+ return current_time;
+ }
+
+ //----------------------------------------------------------------------------
void cmCTestVC::Cleanup()
{
More information about the Cmake-commits
mailing list