diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2009-09-08 17:39:13 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2009-09-08 17:39:13 (GMT) |
commit | 39e5f9d963c6580f95316f9b5f76a3a8f660d6cc (patch) | |
tree | f02f846dbe3b0168cce8f3b15c3f8949c80e6335 /Source/CTest/cmCTestTestHandler.cxx | |
parent | a02ef564018be7e383992d52399279ea7cf48c91 (diff) | |
download | CMake-39e5f9d963c6580f95316f9b5f76a3a8f660d6cc.zip CMake-39e5f9d963c6580f95316f9b5f76a3a8f660d6cc.tar.gz CMake-39e5f9d963c6580f95316f9b5f76a3a8f660d6cc.tar.bz2 |
ENH: Replaced the EXPENSIVE test property with a COST test property taking a floating point value. Tests are now started in descending order of their cost, which defaults to 0 if none is specified.
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 6ae227b..3cf2d12 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1010,7 +1010,7 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed, << std::endl; cmCTestMultiProcessHandler::TestMap tests; - cmCTestMultiProcessHandler::TestMap expensiveTests; + cmCTestMultiProcessHandler::TestCostMap testCosts; cmCTestMultiProcessHandler::PropertiesMap properties; for (ListOfTests::iterator it = this->TestList.begin(); @@ -1037,12 +1037,9 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed, } tests[it->Index] = depends; properties[it->Index] = &*it; - if(it->Expensive) - { - expensiveTests[it->Index] = depends; - } + testCosts[p.Cost].insert(p.Index); } - parallel.SetTests(tests, expensiveTests, properties); + parallel.SetTests(tests, testCosts, properties); parallel.SetPassFailVectors(&passed, &failed); this->TestResults.clear(); parallel.SetTestResults(&this->TestResults); @@ -1975,9 +1972,9 @@ bool cmCTestTestHandler::SetTestsProperties( { rtit->Timeout = atof(val.c_str()); } - if ( key == "EXPENSIVE" ) + if ( key == "COST" ) { - rtit->Expensive = cmSystemTools::IsOn(val.c_str()); + rtit->Cost = atof(val.c_str()); } if ( key == "RUN_SERIAL" ) { @@ -2130,9 +2127,9 @@ bool cmCTestTestHandler::AddTest(const std::vector<std::string>& args) test.IsInBasedOnREOptions = true; test.WillFail = false; - test.Expensive = false; test.RunSerial = false; test.Timeout = 0; + test.Cost = 0; test.Processors = 1; if (this->UseIncludeRegExpFlag && !this->IncludeTestsRegularExpression.find(testname.c_str())) |