[Cmake-commits] [cmake-commits] david.cole committed cmCTestStartCommand.cxx 1.18 1.19 cmCTestStartCommand.h 1.8 1.9

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Dec 29 14:38:33 EST 2009


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

Modified Files:
	cmCTestStartCommand.cxx cmCTestStartCommand.h 
Log Message:
Fix issue #10060 - add APPEND arg to ctest_start command.

If APPEND is given to ctest_start, it will read the tag from the current existing Testing/TAG file rather than creating a new one based on the current time stamp. This allows a developer to run several dashboard scripts in a row, all of which will share the same tag/stamp/buildid when they finally get submitted to CDash. Now you can split the running of build phases and test phases for the same dashboard row into multiple scripts.


Index: cmCTestStartCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestStartCommand.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -C 2 -d -r1.18 -r1.19
*** cmCTestStartCommand.cxx	24 Nov 2009 13:58:54 -0000	1.18
--- cmCTestStartCommand.cxx	29 Dec 2009 19:38:30 -0000	1.19
***************
*** 18,21 ****
--- 18,26 ----
  #include "cmGeneratedFileStream.h"
  
+ cmCTestStartCommand::cmCTestStartCommand()
+ {
+   this->CreateNewTag = true;
+ }
+ 
  bool cmCTestStartCommand
  ::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
***************
*** 45,48 ****
--- 50,62 ----
      }
  
+   if (cnt < args.size())
+     {
+     if (args[cnt] == "APPEND")
+       {
+       cnt ++;
+       this->CreateNewTag = false;
+       }
+     }
+ 
    if ( cnt < args.size() )
      {

Index: cmCTestStartCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestStartCommand.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C 2 -d -r1.8 -r1.9
*** cmCTestStartCommand.h	24 Nov 2009 13:58:55 -0000	1.8
--- cmCTestStartCommand.h	29 Dec 2009 19:38:30 -0000	1.9
***************
*** 24,28 ****
  public:
  
!   cmCTestStartCommand() {}
  
    /**
--- 24,28 ----
  public:
  
!   cmCTestStartCommand();
  
    /**
***************
*** 34,37 ****
--- 34,38 ----
      ni->CTest = this->CTest;
      ni->CTestScriptHandler = this->CTestScriptHandler;
+     ni->CreateNewTag = this->CreateNewTag;
      return ni;
      }
***************
*** 45,48 ****
--- 46,57 ----
  
    /**
+    * Will this invocation of ctest_start create a new TAG file?
+    */
+   bool ShouldCreateNewTag()
+     {
+     return this->CreateNewTag;
+     }
+ 
+   /**
     * The name of the command as specified in CMakeList.txt.
     */
***************
*** 63,72 ****
      {
      return
!       "  ctest_start(Model [TRACK <track>] [source [binary]])\n"
        "Starts the testing for a given model. The command should be called "
        "after the binary directory is initialized. If the 'source' and "
        "'binary' directory are not specified, it reads the "
        "CTEST_SOURCE_DIRECTORY and CTEST_BINARY_DIRECTORY. If the track is "
!       "specified, the submissions will go to the specified track.";
      }
  
--- 72,83 ----
      {
      return
!       "  ctest_start(Model [TRACK <track>] [APPEND] [source [binary]])\n"
        "Starts the testing for a given model. The command should be called "
        "after the binary directory is initialized. If the 'source' and "
        "'binary' directory are not specified, it reads the "
        "CTEST_SOURCE_DIRECTORY and CTEST_BINARY_DIRECTORY. If the track is "
!       "specified, the submissions will go to the specified track. "
!       "If APPEND is used, the existing TAG is used rather than "
!       "creating a new one based on the current time stamp.";
      }
  
***************
*** 75,78 ****
--- 86,90 ----
  private:
    bool InitialCheckout(std::ostream& ofs, std::string const& sourceDir);
+   bool CreateNewTag;
  };
  



More information about the Cmake-commits mailing list