[Cmake-commits] CMake branch, next, updated. v3.3.0-rc1-358-gc94dec1

Brad King brad.king at kitware.com
Tue Jun 9 13:33:19 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  c94dec14b30fcff16c91df0102ef96299e0ab147 (commit)
       via  e1a72359424392e4417a403222f4dbb49152eae9 (commit)
      from  1e97629e39c01a41a8343a0d2b5cdc7ea5e472c5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c94dec14b30fcff16c91df0102ef96299e0ab147
commit c94dec14b30fcff16c91df0102ef96299e0ab147
Merge: 1e97629 e1a7235
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jun 9 13:33:18 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jun 9 13:33:18 2015 -0400

    Merge topic 'ctest-test-load' into next
    
    e1a72359 Revert topic 'ctest-test-load'


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e1a72359424392e4417a403222f4dbb49152eae9
commit e1a72359424392e4417a403222f4dbb49152eae9
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jun 9 13:32:44 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Jun 9 13:32:44 2015 -0400

    Revert topic 'ctest-test-load'
    
    It will be revised and restored after tracking down crashes.

diff --git a/Help/command/ctest_test.rst b/Help/command/ctest_test.rst
index 189093d..8cbb9ec 100644
--- a/Help/command/ctest_test.rst
+++ b/Help/command/ctest_test.rst
@@ -14,7 +14,6 @@ Perform the :ref:`CTest Test Step` as a :ref:`Dashboard Client`.
              [EXCLUDE_LABEL <label-exclude-regex>]
              [INCLUDE_LABEL <label-include-regex>]
              [PARALLEL_LEVEL <level>]
-             [TEST_LOAD <threshold>]
              [SCHEDULE_RANDOM <ON|OFF>]
              [STOP_TIME <time-of-day>]
              [RETURN_VALUE <result-var>]
@@ -42,7 +41,7 @@ The options are:
   Specify the end of a range of test numbers.
 
 ``STRIDE <stride-number>``
-  Specify the stride by which to step across a range of test numbers.
+  Specify the stride by which to step acorss a range of test numbers.
 
 ``EXCLUDE <exclude-regex>``
   Specify a regular expression matching test names to exclude.
@@ -62,10 +61,6 @@ The options are:
   Specify a positive number representing the number of tests to
   be run in parallel.
 
-``TEST_LOAD <threshold>``
-  Specify a CPU load threshold that CTest should attempt to
-  not cross.  See :variable:`CTEST_TEST_LOAD` for more details.
-
 ``SCHEDULE_RANDOM <ON|OFF>``
   Launch tests in a random order.  This may be useful for detecting
   implicit test dependencies.
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 6ab7f3d..bd02f8b 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -152,7 +152,6 @@ Variables that Change Behavior
    /variable/CMAKE_SYSTEM_LIBRARY_PATH
    /variable/CMAKE_SYSTEM_PREFIX_PATH
    /variable/CMAKE_SYSTEM_PROGRAM_PATH
-   /variable/CMAKE_TEST_LOAD
    /variable/CMAKE_USER_MAKE_RULES_OVERRIDE
    /variable/CMAKE_WARN_DEPRECATED
    /variable/CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
@@ -382,7 +381,6 @@ Variables for CTest
    /variable/CTEST_SVN_COMMAND
    /variable/CTEST_SVN_OPTIONS
    /variable/CTEST_SVN_UPDATE_OPTIONS
-   /variable/CTEST_TEST_LOAD
    /variable/CTEST_TEST_TIMEOUT
    /variable/CTEST_TRIGGER_SITE
    /variable/CTEST_UPDATE_COMMAND
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
index 6dd7330..c91321b 100644
--- a/Help/manual/ctest.1.rst
+++ b/Help/manual/ctest.1.rst
@@ -66,10 +66,6 @@ Options
  number of jobs.  This option can also be set by setting the
  environment variable ``CTEST_PARALLEL_LEVEL``.
 
-``--test-load <level>``
- Limit CPU load during parallel testing.
- See :variable:`CTEST_TEST_LOAD` for more details.
-
 ``-Q,--quiet``
  Make ctest quiet.
 
diff --git a/Help/release/dev/ctest-test-load-option.rst b/Help/release/dev/ctest-test-load-option.rst
deleted file mode 100644
index 25efc26..0000000
--- a/Help/release/dev/ctest-test-load-option.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-ctest-test-load-option
-----------------------
-
-* It is now possible to set the 'test-load' option in CTest.
-  If set, then CTest will not start any new tests that would be
-  projected to increase the CPU load above this level.
diff --git a/Help/variable/CMAKE_TEST_LOAD.rst b/Help/variable/CMAKE_TEST_LOAD.rst
deleted file mode 100644
index 7baf6dd..0000000
--- a/Help/variable/CMAKE_TEST_LOAD.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-CMAKE_TEST_LOAD
-------------------
-
-CMake variable to specify the CTest ``TestLoad`` setting.
-See :variable:`CTEST_TEST_LOAD` for more details.
-
-Note that this variable is not honored during script mode.
-If you intend to drive your tests with ``ctest -S``, please set
-:variable:`CTEST_TEST_LOAD` in your dashboard script instead.
diff --git a/Help/variable/CTEST_TEST_LOAD.rst b/Help/variable/CTEST_TEST_LOAD.rst
deleted file mode 100644
index 6d7aea6..0000000
--- a/Help/variable/CTEST_TEST_LOAD.rst
+++ /dev/null
@@ -1,24 +0,0 @@
-CTEST_TEST_LOAD
-------------------
-
-Specify the ``TestLoad`` setting
-in a :manual:`ctest(1)` dashboard client script.
-
-This creates a CPU load threshold that CTest will attempt to
-not cross.  CTest will not start a new test if doing so
-would be likely to raise the CPU load above this threshold.
-Please note that this variable is only honored during parallel testing
-(``ctest -j`` or similar).
-
-Here are the various ways that you can set this threshold:
-
-* The ``TEST_LOAD`` option to :command:`ctest_test`.
-* :variable:`CTEST_TEST_LOAD` in a dashboard script.
-* Passing the ``--ctest-load`` command-line argument to :manual:`ctest(1)`.
-* Setting the :variable:`CMAKE_TEST_LOAD` variable in your CMake project.
-
-These are listed here in descending priority order, ie
-``ctest_test(TEST_LOAD ...)`` will override any of the other
-methods of setting this threshold.  Also note that
-:variable:`CMAKE_TEST_LOAD` is not honored when running ctest
-in script (``-S``) mode.
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake
index 0b34fcd..8278c5c 100644
--- a/Modules/CTest.cmake
+++ b/Modules/CTest.cmake
@@ -173,9 +173,6 @@ if(BUILD_TESTING)
   set(DART_TESTING_TIMEOUT 1500 CACHE STRING
     "Maximum time allowed before CTest will kill the test.")
 
-  set(CTEST_MAX_LOAD 0 CACHE STRING
-    "Maximum system load that CTest should not exceed during parallel testing.  Specify 0 for no maximum.")
-
   set(CTEST_SUBMIT_RETRY_DELAY 5 CACHE STRING
     "How long to wait between timed-out CTest submissions.")
   set(CTEST_SUBMIT_RETRY_COUNT 3 CACHE STRING
diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in
index d8ec84a..37a0a40 100644
--- a/Modules/DartConfiguration.tcl.in
+++ b/Modules/DartConfiguration.tcl.in
@@ -95,10 +95,6 @@ SlurmRunCommand: @SLURM_SRUN_COMMAND@
 # Currently set to 25 minutes
 TimeOut: @DART_TESTING_TIMEOUT@
 
-# During parallel testing CTest will not start a new test if doing
-# so would cause the system load to exceed this value.
-TestLoad: @CMAKE_TEST_LOAD@
-
 UseLaunchers: @CTEST_USE_LAUNCHERS@
 CurlOptions: @CTEST_CURL_OPTIONS@
 # warning, if you add new options here that have to do with submit,
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index f9357d6..bd090db 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -13,16 +13,12 @@
 #include "cmProcess.h"
 #include "cmStandardIncludes.h"
 #include "cmCTest.h"
-#include "cmCTestScriptHandler.h"
 #include "cmSystemTools.h"
-#include "cmFileLock.h"
-#include "cmFileLockResult.h"
 #include <stdlib.h>
 #include <stack>
 #include <list>
 #include <float.h>
 #include <cmsys/FStream.hxx>
-#include <cmsys/SystemInformation.hxx>
 
 class TestComparator
 {
@@ -44,12 +40,10 @@ private:
 cmCTestMultiProcessHandler::cmCTestMultiProcessHandler()
 {
   this->ParallelLevel = 1;
-  this->TestLoad = 0;
   this->Completed = 0;
   this->RunningCount = 0;
   this->StopTimePassed = false;
   this->HasCycles = false;
-  this->SerialTestRunning = false;
 }
 
 cmCTestMultiProcessHandler::~cmCTestMultiProcessHandler()
@@ -89,11 +83,6 @@ void cmCTestMultiProcessHandler::SetParallelLevel(size_t level)
   this->ParallelLevel = level < 1 ? 1 : level;
 }
 
-void cmCTestMultiProcessHandler::SetTestLoad(size_t load)
-{
-  this->TestLoad = load < 1 ? 0 : load;
-}
-
 //---------------------------------------------------------
 void cmCTestMultiProcessHandler::RunTests()
 {
@@ -183,11 +172,6 @@ void cmCTestMultiProcessHandler::LockResources(int index)
   this->LockedResources.insert(
       this->Properties[index]->LockedResources.begin(),
       this->Properties[index]->LockedResources.end());
-
-  if (this->Properties[index]->RunSerial)
-    {
-    this->SerialTestRunning = true;
-    }
 }
 
 //---------------------------------------------------------
@@ -214,21 +198,17 @@ inline size_t cmCTestMultiProcessHandler::GetProcessorsUsed(int test)
 {
   size_t processors =
     static_cast<int>(this->Properties[test]->Processors);
-  //If processors setting is set higher than the -j
+  //If this is set to run serially, it must run alone.
+  //Also, if processors setting is set higher than the -j
   //setting, we default to using all of the process slots.
-  if (processors > this->ParallelLevel)
+  if(this->Properties[test]->RunSerial
+     || processors > this->ParallelLevel)
     {
     processors = this->ParallelLevel;
     }
   return processors;
 }
 
-std::string cmCTestMultiProcessHandler::GetName(int test)
-{
-  return this->Properties[test]->Name;
-}
-
-
 //---------------------------------------------------------
 bool cmCTestMultiProcessHandler::StartTest(int test)
 {
@@ -268,173 +248,23 @@ void cmCTestMultiProcessHandler::StartNextTests()
     return;
     }
 
-  // Don't start any new tests if one with the RUN_SERIAL property
-  // is already running.
-  if (this->SerialTestRunning)
-    {
-    return;
-    }
-
-  bool allTestsFailedTestLoadCheck = false;
-  bool testingThisFeature = false;
-  size_t minProcessorsRequired = this->ParallelLevel;
-  std::string testWithMinProcessors = "";
-
-  cmsys::SystemInformation info;
-  const std::string lockFile = "/tmp/.cmake_testload.lock"; // TODO: Filename
-  if (this->TestLoad > 0)
-    {
-    allTestsFailedTestLoadCheck = true;
-
-    if (!cmSystemTools::FileExists(lockFile))
-      {
-      FILE *file = cmsys::SystemTools::Fopen(lockFile, "w");
-      if (!file)
-        {
-        // TODO: ?
-        }
-      fclose(file);
-      }
-    }
-  cmFileLock testLoadLock;
-
-  double systemLoad = 0.0;
-
   TestList copy = this->SortedTests;
   for(TestList::iterator test = copy.begin(); test != copy.end(); ++test)
     {
-    // Take a nap if we're currently performing a RUN_SERIAL test.
-    if (this->SerialTestRunning)
-      {
-      allTestsFailedTestLoadCheck = true;
-      break;
-      }
-    // We can only start a RUN_SERIAL test if no other tests are also running.
-    if (this->Properties[*test]->RunSerial && this->RunningCount > 0)
-      {
-      continue;
-      }
-
     size_t processors = GetProcessorsUsed(*test);
-    bool testLoadOk;
-    if (this->TestLoad > 0)
-      {
-      // First, try to get file lock..
-      if (!testLoadLock.IsLocked(lockFile))
-        {
-        cmFileLockResult result = testLoadLock.Lock(lockFile, 1);
-        if (result.IsOk())
-          {
-          // Check for a fake load average value used in testing.
-          const char* fake_load_value =
-            getenv("__FAKE_LOAD_AVERAGE_FOR_CTEST_TESTING");
-          if (fake_load_value)
-            {
-            testingThisFeature = true;
-            systemLoad = atoi(fake_load_value);
-            }
-          // If it's not set, look up the true load average.
-          else
-            {
-            systemLoad = info.GetLoadAverage();
-            }
 
-          // Don't start more tests than your max load can support.
-          if (numToStart > (this->TestLoad - systemLoad))
-            {
-            numToStart = this->TestLoad - systemLoad;
-            }
-
-          testLoadOk = processors <= (this->TestLoad - systemLoad);
-          if (testLoadOk)
-            {
-            cmCTestLog(this->CTest, DEBUG, "OK to run " << GetName(*test) << ", it requires " << processors << " procs & system load is: " << systemLoad << std::endl);
-            }
-          }
-        else
+    if(processors <= numToStart && this->StartTest(*test))
+      {
+        if(this->StopTimePassed)
           {
-          testLoadOk = false;
+          return;
           }
-        }
-      else
-        {
-        testLoadOk = false;
-        }
-
-      allTestsFailedTestLoadCheck &= !testLoadOk;
-      }
-    else
-      {
-      testLoadOk = true;
-      }
-
-    if (processors <= minProcessorsRequired)
-      {
-      minProcessorsRequired = processors;
-      testWithMinProcessors = GetName(*test);
-      }
-
-    if(testLoadOk && processors <= numToStart && this->StartTest(*test))
-      {
-      testLoadLock.Release();
-
-      if(this->StopTimePassed)
-        {
-        return;
-        }
-
-      numToStart -= processors;
+        numToStart -= processors;
       }
     else if(numToStart == 0)
       {
-      testLoadLock.Release();
       return;
       }
-    else
-      {
-      testLoadLock.Release();
-      }
-    }   // for
-
-  if (allTestsFailedTestLoadCheck)
-    {
-    cmCTestLog(this->CTest, HANDLER_OUTPUT, "***** WAITING, ");
-    time_t currenttime = time(0);
-    struct tm* t = localtime(&currenttime);
-    char current_time[1024];
-    strftime(current_time, 1000, "%s", t);
-    cmCTestLog(this->CTest, HANDLER_OUTPUT, "System Time: "
-      << current_time << ", ");
-
-    if (this->SerialTestRunning)
-      {
-      cmCTestLog(this->CTest, HANDLER_OUTPUT,
-        "Waiting for RUN_SERIAL test to finish." << std::endl);
-      cmCTestLog(this->CTest, HANDLER_OUTPUT, "*****" << std::endl);
-      }
-    else
-      {
-      cmCTestLog(this->CTest, HANDLER_OUTPUT, "System Load: "
-        << systemLoad << ", ");
-      cmCTestLog(this->CTest, HANDLER_OUTPUT, "Max Allowed Load: "
-        << this->TestLoad << ", ");
-      cmCTestLog(this->CTest, HANDLER_OUTPUT, "Smallest test "
-        << testWithMinProcessors << " requires " << minProcessorsRequired);
-      cmCTestLog(this->CTest, HANDLER_OUTPUT, "*****" << std::endl);
-      }
-
-    if (testingThisFeature)
-      {
-      // Break out of the infinite loop of waiting for our fake load
-      // to come down.
-      this->StopTimePassed = true;
-      }
-    else
-      {
-      // Wait between 1 and 5 seconds before trying again.
-      cmCTestScriptHandler::SleepInSeconds(
-        cmSystemTools::RandomSeed() % 5 + 1);
-      }
     }
 }
 
@@ -489,11 +319,6 @@ bool cmCTestMultiProcessHandler::CheckOutput()
     this->WriteCheckpoint(test);
     this->UnlockResources(test);
     this->RunningCount -= GetProcessorsUsed(test);
-    if (this->Properties[test]->RunSerial)
-      {
-      this->SerialTestRunning = false;
-      }
-
     delete p;
     }
   return true;
diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h
index 1ca7e7c..6440fbc 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.h
+++ b/Source/CTest/cmCTestMultiProcessHandler.h
@@ -37,7 +37,6 @@ public:
   void SetTests(TestMap& tests, PropertiesMap& properties);
   // Set the max number of tests that can be run at the same time.
   void SetParallelLevel(size_t);
-  void SetTestLoad(size_t max);
   virtual void RunTests();
   void PrintTestList();
   void PrintLabels();
@@ -94,7 +93,6 @@ protected:
   bool CheckCycles();
   int FindMaxIndex();
   inline size_t GetProcessorsUsed(int index);
-  std::string GetName(int index);
 
   void LockResources(int index);
   void UnlockResources(int index);
@@ -118,13 +116,11 @@ protected:
   std::set<std::string> LockedResources;
   std::vector<cmCTestTestHandler::cmCTestTestResult>* TestResults;
   size_t ParallelLevel; // max number of process that can be run at once
-  size_t TestLoad;
   std::set<cmCTestRunTest*> RunningTests;  // current running tests
   cmCTestTestHandler * TestHandler;
   cmCTest* CTest;
   bool HasCycles;
   bool Quiet;
-  bool SerialTestRunning;
 };
 
 #endif
diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx
index 2f8016f..8b357ac 100644
--- a/Source/CTest/cmCTestTestCommand.cxx
+++ b/Source/CTest/cmCTestTestCommand.cxx
@@ -26,7 +26,6 @@ cmCTestTestCommand::cmCTestTestCommand()
   this->Arguments[ctt_PARALLEL_LEVEL] = "PARALLEL_LEVEL";
   this->Arguments[ctt_SCHEDULE_RANDOM] = "SCHEDULE_RANDOM";
   this->Arguments[ctt_STOP_TIME] = "STOP_TIME";
-  this->Arguments[ctt_TEST_LOAD] = "TEST_LOAD";
   this->Arguments[ctt_LAST] = 0;
   this->Last = ctt_LAST;
 }
@@ -50,17 +49,6 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler()
       }
     }
   this->CTest->SetTimeOut(timeout);
-
-  if(const char* ctestTestLoad =
-     this->Makefile->GetDefinition("CTEST_TEST_LOAD"))
-    {
-    int testLoad = atoi(ctestTestLoad);
-    if (testLoad > 0)
-      {
-      this->CTest->SetTestLoad(testLoad);
-      }
-    }
-
   cmCTestGenericHandler* handler = this->InitializeActualHandler();
   if ( this->Values[ctt_START] || this->Values[ctt_END] ||
     this->Values[ctt_STRIDE] )
@@ -115,14 +103,6 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler()
     {
     this->CTest->SetStopTime(this->Values[ctt_STOP_TIME]);
     }
-  if(this->Values[ctt_TEST_LOAD])
-    {
-    int testLoad = atoi(this->Values[ctt_TEST_LOAD]);
-    if (testLoad > 0)
-      {
-      this->CTest->SetTestLoad(testLoad);
-      }
-    }
   handler->SetQuiet(this->Quiet);
   return handler;
 }
diff --git a/Source/CTest/cmCTestTestCommand.h b/Source/CTest/cmCTestTestCommand.h
index 0dfca97..a1e5f36 100644
--- a/Source/CTest/cmCTestTestCommand.h
+++ b/Source/CTest/cmCTestTestCommand.h
@@ -60,7 +60,6 @@ protected:
     ctt_PARALLEL_LEVEL,
     ctt_SCHEDULE_RANDOM,
     ctt_STOP_TIME,
-    ctt_TEST_LOAD,
     ctt_LAST
   };
 };
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 3f3c650..70b7f5c 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1060,7 +1060,6 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<std::string> &passed,
     new cmCTestBatchTestHandler : new cmCTestMultiProcessHandler;
   parallel->SetCTest(this->CTest);
   parallel->SetParallelLevel(this->CTest->GetParallelLevel());
-  parallel->SetTestLoad(this->CTest->GetTestLoad());
   parallel->SetTestHandler(this);
   parallel->SetQuiet(this->Quiet);
 
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 17dfafc..e3b7a2b 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -294,7 +294,6 @@ cmCTest::cmCTest()
   this->LabelSummary           = true;
   this->ParallelLevel          = 1;
   this->ParallelLevelSetInCli  = false;
-  this->TestLoad               = 0;
   this->SubmitIndex            = 0;
   this->Failover               = false;
   this->BatchJobs              = false;
@@ -394,11 +393,6 @@ void cmCTest::SetParallelLevel(int level)
   this->ParallelLevel = level < 1 ? 1 : level;
 }
 
-void cmCTest::SetTestLoad(int max)
-{
-  this->TestLoad = max < 1 ? 0 : max;
-}
-
 //----------------------------------------------------------------------------
 bool cmCTest::ShouldCompressTestOutput()
 {
@@ -826,10 +820,6 @@ bool cmCTest::UpdateCTestConfiguration()
     cmSystemTools::ChangeDirectory(this->BinaryDir);
     }
   this->TimeOut = atoi(this->GetCTestConfiguration("TimeOut").c_str());
-  if ( !this->GetCTestConfiguration("TestLoad").empty() )
-    {
-    this->SetTestLoad(atoi(this->GetCTestConfiguration("TestLoad").c_str()));
-    }
   if ( this->ProduceXML )
     {
     this->CompressXMLFiles = cmSystemTools::IsOn(
@@ -2061,13 +2051,6 @@ bool cmCTest::HandleCommandLineArguments(size_t &i,
       }
     }
 
-  if(this->CheckArgument(arg, "--test-load") && i < args.size() - 1)
-    {
-    i++;
-    int max = atoi(args[i].c_str());
-    this->SetTestLoad(max);
-    }
-
   if(this->CheckArgument(arg, "--no-compress-output"))
     {
     this->CompressTestOutput = false;
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index c47c786..db3ea10 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -161,9 +161,6 @@ public:
   int GetParallelLevel() { return this->ParallelLevel; }
   void SetParallelLevel(int);
 
-  int GetTestLoad() { return this->TestLoad; }
-  void SetTestLoad(int);
-
   /**
    * Check if CTest file exists
    */
@@ -502,8 +499,6 @@ private:
   int                     ParallelLevel;
   bool                    ParallelLevelSetInCli;
 
-  int                     TestLoad;
-
   int                     CompatibilityMode;
 
   // information for the --build-and-test options
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index afcbd61..e784759 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -98,7 +98,6 @@ static const char * cmDocumentationOptions[][2] =
 
   {"--test-command", "The test to run with the --build-and-test option."},
   {"--test-timeout", "The time limit in seconds, internal use only."},
-  {"--test-load", "CPU load threshold for starting new parallel tests."},
   {"--tomorrow-tag", "Nightly or experimental starts with next day tag."},
   {"--ctest-config", "The configuration file used to initialize CTest state "
    "when submitting dashboards."},
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
index dc13c9f..a3ce139 100644
--- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
@@ -52,31 +52,3 @@ add_test(MergeOutput \"${CMAKE_COMMAND}\" -P \"${RunCMake_SOURCE_DIR}/MergeOutpu
   run_cmake_command(MergeOutput ${CMAKE_CTEST_COMMAND} -V)
 endfunction()
 run_MergeOutput()
-
-
-function(run_TestLoad name load)
-  set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TestLoad)
-  set(RunCMake_TEST_NO_CLEAN 1)
-  file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
-  file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-  file(WRITE "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" "
-  add_test(TestLoad1 \"${CMAKE_COMMAND}\" -E echo \"test of --test-load\")
-  add_test(TestLoad2 \"${CMAKE_COMMAND}\" -E echo \"test of --test-load\")
-")
-  run_cmake_command(${name} ${CMAKE_CTEST_COMMAND} -j2 --test-load ${load} --test-timeout 5)
-endfunction()
-
-# Tests for the --test-load feature of ctest
-#
-# Spoof a load average value to make these tests more reliable.
-set(ENV{__FAKE_LOAD_AVERAGE_FOR_CTEST_TESTING} 5)
-
-# Verify that new tests are not started when the load average exceeds
-# our threshold.
-run_TestLoad(test-load-fail 2)
-
-# Verify that new tests are started when the load average falls below
-# our threshold.
-run_TestLoad(test-load-pass 10)
-
-unset(ENV{__FAKE_LOAD_AVERAGE_FOR_CTEST_TESTING})
diff --git a/Tests/RunCMake/CTestCommandLine/test-load-fail-stderr.txt b/Tests/RunCMake/CTestCommandLine/test-load-fail-stderr.txt
deleted file mode 100644
index eafba1c..0000000
--- a/Tests/RunCMake/CTestCommandLine/test-load-fail-stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-No tests were found!!!
diff --git a/Tests/RunCMake/CTestCommandLine/test-load-fail-stdout.txt b/Tests/RunCMake/CTestCommandLine/test-load-fail-stdout.txt
deleted file mode 100644
index fb36bb1..0000000
--- a/Tests/RunCMake/CTestCommandLine/test-load-fail-stdout.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-^Test project .*/Tests/RunCMake/CTestCommandLine/TestLoad
-\*\*\*\*\* WAITING, System Time: [0-9]+, System Load: 5, Max Allowed Load: 2, Smallest test TestLoad2 requires 1\*\*\*\*\*
diff --git a/Tests/RunCMake/CTestCommandLine/test-load-pass-stderr.txt b/Tests/RunCMake/CTestCommandLine/test-load-pass-stderr.txt
deleted file mode 100644
index 10f3293..0000000
--- a/Tests/RunCMake/CTestCommandLine/test-load-pass-stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-^$
diff --git a/Tests/RunCMake/CTestCommandLine/test-load-pass-stdout.txt b/Tests/RunCMake/CTestCommandLine/test-load-pass-stdout.txt
deleted file mode 100644
index 7ee3dae..0000000
--- a/Tests/RunCMake/CTestCommandLine/test-load-pass-stdout.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-^Test project .*/Tests/RunCMake/CTestCommandLine/TestLoad
-    Start 1: TestLoad1
-    Start 2: TestLoad2
-1/2 Test #[1-2]: TestLoad[1-2] ........................   Passed +[0-9.]+ sec
-2/2 Test #[1-2]: TestLoad[1-2] ........................   Passed +[0-9.]+ sec
-+
-100% tests passed, 0 tests failed out of 2

-----------------------------------------------------------------------

Summary of changes:
 Help/command/ctest_test.rst                        |    7 +-
 Help/manual/cmake-variables.7.rst                  |    2 -
 Help/manual/ctest.1.rst                            |    4 -
 Help/release/dev/ctest-test-load-option.rst        |    6 -
 Help/variable/CMAKE_TEST_LOAD.rst                  |    9 -
 Help/variable/CTEST_TEST_LOAD.rst                  |   24 ---
 Modules/CTest.cmake                                |    3 -
 Modules/DartConfiguration.tcl.in                   |    4 -
 Source/CTest/cmCTestMultiProcessHandler.cxx        |  193 +-------------------
 Source/CTest/cmCTestMultiProcessHandler.h          |    4 -
 Source/CTest/cmCTestTestCommand.cxx                |   20 --
 Source/CTest/cmCTestTestCommand.h                  |    1 -
 Source/CTest/cmCTestTestHandler.cxx                |    1 -
 Source/cmCTest.cxx                                 |   17 --
 Source/cmCTest.h                                   |    5 -
 Source/ctest.cxx                                   |    1 -
 Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake |   28 ---
 .../CTestCommandLine/test-load-fail-stderr.txt     |    1 -
 .../CTestCommandLine/test-load-fail-stdout.txt     |    2 -
 .../CTestCommandLine/test-load-pass-stderr.txt     |    1 -
 .../CTestCommandLine/test-load-pass-stdout.txt     |    7 -
 21 files changed, 10 insertions(+), 330 deletions(-)
 delete mode 100644 Help/release/dev/ctest-test-load-option.rst
 delete mode 100644 Help/variable/CMAKE_TEST_LOAD.rst
 delete mode 100644 Help/variable/CTEST_TEST_LOAD.rst
 delete mode 100644 Tests/RunCMake/CTestCommandLine/test-load-fail-stderr.txt
 delete mode 100644 Tests/RunCMake/CTestCommandLine/test-load-fail-stdout.txt
 delete mode 100644 Tests/RunCMake/CTestCommandLine/test-load-pass-stderr.txt
 delete mode 100644 Tests/RunCMake/CTestCommandLine/test-load-pass-stdout.txt


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list