Merge topic 'fix-11746-sort-failed-tests-output'
4575ed9
Fix line too long style violationba4886b
CTest: print failed tests in index order (#11746)
This commit is contained in:
commit
0923610b6d
|
@ -33,6 +33,7 @@
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
|
||||||
#include <memory> // auto_ptr
|
#include <memory> // auto_ptr
|
||||||
|
#include <set>
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
class cmCTestSubdirCommand : public cmCommand
|
class cmCTestSubdirCommand : public cmCommand
|
||||||
|
@ -617,9 +618,13 @@ int cmCTestTestHandler::ProcessHandler()
|
||||||
<< "The following tests FAILED:" << std::endl);
|
<< "The following tests FAILED:" << std::endl);
|
||||||
this->StartLogFile("TestsFailed", ofs);
|
this->StartLogFile("TestsFailed", ofs);
|
||||||
|
|
||||||
std::vector<cmCTestTestHandler::cmCTestTestResult>::iterator ftit;
|
typedef std::set<cmCTestTestHandler::cmCTestTestResult,
|
||||||
for(ftit = this->TestResults.begin();
|
cmCTestTestResultLess> SetOfTests;
|
||||||
ftit != this->TestResults.end(); ++ftit)
|
SetOfTests resultsSet(this->TestResults.begin(),
|
||||||
|
this->TestResults.end());
|
||||||
|
|
||||||
|
for(SetOfTests::iterator ftit = resultsSet.begin();
|
||||||
|
ftit != resultsSet.end(); ++ftit)
|
||||||
{
|
{
|
||||||
if ( ftit->Status != cmCTestTestHandler::COMPLETED )
|
if ( ftit->Status != cmCTestTestHandler::COMPLETED )
|
||||||
{
|
{
|
||||||
|
|
|
@ -125,7 +125,16 @@ public:
|
||||||
cmCTestTestProperties* Properties;
|
cmCTestTestProperties* Properties;
|
||||||
};
|
};
|
||||||
|
|
||||||
// add configuraitons to a search path for an executable
|
struct cmCTestTestResultLess
|
||||||
|
{
|
||||||
|
bool operator() (const cmCTestTestResult &lhs,
|
||||||
|
const cmCTestTestResult &rhs) const
|
||||||
|
{
|
||||||
|
return lhs.TestCount < rhs.TestCount;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// add configurations to a search path for an executable
|
||||||
static void AddConfigurations(cmCTest *ctest,
|
static void AddConfigurations(cmCTest *ctest,
|
||||||
std::vector<std::string> &attempted,
|
std::vector<std::string> &attempted,
|
||||||
std::vector<std::string> &attemptedConfigs,
|
std::vector<std::string> &attemptedConfigs,
|
||||||
|
@ -141,7 +150,7 @@ public:
|
||||||
|
|
||||||
typedef std::vector<cmCTestTestProperties> ListOfTests;
|
typedef std::vector<cmCTestTestProperties> ListOfTests;
|
||||||
protected:
|
protected:
|
||||||
// comput a final test list
|
// compute a final test list
|
||||||
virtual int PreProcessHandler();
|
virtual int PreProcessHandler();
|
||||||
virtual int PostProcessHandler();
|
virtual int PostProcessHandler();
|
||||||
virtual void GenerateTestCommand(std::vector<std::string>& args);
|
virtual void GenerateTestCommand(std::vector<std::string>& args);
|
||||||
|
|
Loading…
Reference in New Issue