View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014581CMakeCTestpublic2013-11-19 05:442015-11-02 09:13
ReporterDavid Weese 
Assigned To 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionnot fixable 
PlatformAppleOSMacOS VersionOS X 10.9
Product VersionCMake 2.8.12 
Target VersionFixed in Version 
Summary0014581: The git module of CTest doesn't use the nightly timestamp for git update
DescriptionThe Git module of CTest doesn't use the nightly timestamp for git update. Instead always the branch is updated to the current HEAD.

As a consequence, nightly builds that were launched later at the same day, e.g. because they were executed one after another, possibly use a different state of the repository.

That behavior is different from the Subversion module where in case of the CTEST_MODEL=Nightly a night-timestamp is used for the update.
Additional InformationThe current SVN module of CTest looks as follows (cmake/Source/CTest/cmCTestSVN.cxx:282-286):

  // Specify the start time for nightly testing.
  if(this->CTest->GetTestModel() == cmCTest::NIGHTLY)
  {
    args.push_back("-r{" + this->GetNightlyTime() + " +0000}");
  }

The corresponding UpdateImpl function for GIT is located at cmake/Source/CTest/cmCTestGIT.cxx:266-293. However, in the whole cpp file there is no call of GetTestModel() and occurrence of cmCTest::NIGHTLY.
TagsNo tags attached.
Attached Files

 Relationships
related to 0015512closed Fix CTEST_GIT_UPDATE_CUSTOM documentation 

  Notes
(0034477)
Brad King (manager)
2013-11-19 08:28

This is intentional. The idea of a nightly start time cannot be implemented client-side for Git. There is no way for a client to know where a particular remote branch pointed as of the nightly start time. This is the nature of DVCS. One could create a commit prior to the nightly start time but not push it until after the nightly start time and then test clients would still not get a consistent version.

CMake itself solves this problem with a dedicated server-side branch. We use a scheduled task that runs exactly at the nightly start time to update a server-side branch (e.g. nightly-master) to wherever the corresponding branch (e.g. master) is as of that time. Then CTest clients follow the "nightly" branch to get a consistent version.
(0038489)
trsystran (reporter)
2015-04-13 08:59

What about trying to over the case where all nightly builds start approximately at the same time and during that time the referenced branch name is not moved around? This is a fairly standard case, and it behaves like SVN: in this case we *can* define a nightly time globally.

If the prerequisites are fulfilled, then it will work. Otherwise it won't work as expected. (It currently never works as expected...)

We could add an option for the CTest user to set when he can guarantee the prerequisites.
This won't break any existing setup, and would improve GIT support with this new option.
(0038491)
Brad King (manager)
2015-04-13 09:20

Re 0014581:0038489: If all the clients start during a period when the branch is not moving, why is special support needed at all? In that case just updating to the current branch head is sufficient.

FWIW the existing behavior is now documented here:

 http://www.cmake.org/cmake/help/v3.2/manual/ctest.1.html#ctest-update-step [^]
 NightlyStartTime: ... This is not well-defined in distributed version-control systems so the setting is ignored.
(0038492)
trsystran (reporter)
2015-04-13 09:27

My scenario allows commits being added to a branch during the ctest start period, it just requires the branch to go forward, which may be a common case.

But indeed this adds complexity for a thin benefit in covered use-cases.

Now that it's documented it's OK. I didn't saw this.
(0039765)
Robert Maynard (manager)
2015-11-02 09:13

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2013-11-19 05:44 David Weese New Issue
2013-11-19 08:28 Brad King Note Added: 0034477
2015-04-13 08:59 trsystran Note Added: 0038489
2015-04-13 09:20 Brad King Note Added: 0038491
2015-04-13 09:27 trsystran Note Added: 0038492
2015-04-13 09:29 Brad King Status new => resolved
2015-04-13 09:29 Brad King Resolution open => not fixable
2015-04-13 12:49 Brad King Relationship added related to 0015512
2015-11-02 09:13 Robert Maynard Note Added: 0039765
2015-11-02 09:13 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team