[Cmake-commits] [cmake-commits] zach.mullen committed cmCTest.cxx 1.379 1.380 cmCTest.h 1.125 1.126

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Nov 30 16:08:13 EST 2009


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

Modified Files:
	cmCTest.cxx cmCTest.h 
Log Message:
Added the --timeout option to ctest command line.  This sets a global timeout on all tests if no more specific timeout is set on them.


Index: cmCTest.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.h,v
retrieving revision 1.125
retrieving revision 1.126
diff -C 2 -d -r1.125 -r1.126
*** cmCTest.h	24 Nov 2009 13:58:59 -0000	1.125
--- cmCTest.h	30 Nov 2009 21:08:11 -0000	1.126
***************
*** 130,133 ****
--- 130,136 ----
    double GetTimeOut() { return this->TimeOut; }
    void SetTimeOut(double t) { this->TimeOut = t; }
+ 
+   double GetGlobalTimeout() { return this->GlobalTimeout; }
+ 
    // how many test to run at the same time
    int GetParallelLevel() { return this->ParallelLevel; }
***************
*** 420,423 ****
--- 423,428 ----
    double                  TimeOut;
  
+   double                  GlobalTimeout;
+ 
    int                     MaxTestNameWidth;
  

Index: cmCTest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.cxx,v
retrieving revision 1.379
retrieving revision 1.380
diff -C 2 -d -r1.379 -r1.380
*** cmCTest.cxx	24 Nov 2009 13:58:59 -0000	1.379
--- cmCTest.cxx	30 Nov 2009 21:08:11 -0000	1.380
***************
*** 225,228 ****
--- 225,229 ----
    this->InteractiveDebugMode   = true;
    this->TimeOut                = 0;
+   this->GlobalTimeout          = 0;
    this->CompressXMLFiles       = false;
    this->CTestConfigFile        = "";
***************
*** 1703,1706 ****
--- 1704,1714 ----
      this->SetParallelLevel(plevel);
      }
+ 
+   if(this->CheckArgument(arg, "--timeout")  && i < args.size() - 1)
+     {
+     i++;
+     double timeout = (double)atof(args[i].c_str());
+     this->GlobalTimeout = timeout;
+     }
    
    if(this->CheckArgument(arg, "-C", "--build-config") &&
***************
*** 2761,2763 ****
    cmCTestLog(this, HANDLER_OUTPUT, test_outputs << std::endl << std::flush);
  }
- 
--- 2769,2770 ----



More information about the Cmake-commits mailing list