ENH: Add a superclass to all handlers

This commit is contained in:
Andy Cedilnik 2005-01-27 11:43:22 -05:00
parent bf3d774645
commit dc0ce24cc6
16 changed files with 137 additions and 114 deletions

View File

@ -139,6 +139,7 @@ ADD_EXECUTABLE(cmake cmakemain.cxx)
ADD_EXECUTABLE(DumpDocumentation cmDumpDocumentation) ADD_EXECUTABLE(DumpDocumentation cmDumpDocumentation)
SET(CMTEST_SRCS ctest.cxx cmCTest.cxx SET(CMTEST_SRCS ctest.cxx cmCTest.cxx
CTest/cmCTestGenericHandler.cxx
CTest/cmCTestBuildHandler.cxx CTest/cmCTestBuildHandler.cxx
CTest/cmCTestConfigureHandler.cxx CTest/cmCTestConfigureHandler.cxx
CTest/cmCTestCoverageHandler.cxx CTest/cmCTestCoverageHandler.cxx

View File

@ -156,8 +156,6 @@ cmCTestWarningErrorFileLine[] = {
//---------------------------------------------------------------------- //----------------------------------------------------------------------
cmCTestBuildHandler::cmCTestBuildHandler() cmCTestBuildHandler::cmCTestBuildHandler()
{ {
m_Verbose = false;
m_CTest = 0;
int cc; int cc;
for ( cc = 0; cmCTestWarningErrorFileLine[cc].m_RegularExpressionString; ++ cc ) for ( cc = 0; cmCTestWarningErrorFileLine[cc].m_RegularExpressionString; ++ cc )
{ {
@ -194,10 +192,8 @@ void cmCTestBuildHandler::PopulateCustomVectors(cmMakefile *mf)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
//clearly it would be nice if this were broken up into a few smaller //clearly it would be nice if this were broken up into a few smaller
//functions and commented... //functions and commented...
int cmCTestBuildHandler::BuildDirectory(cmCTest *ctest_inst) int cmCTestBuildHandler::BuildDirectory()
{ {
m_CTest = ctest_inst;
std::cout << "Build project" << std::endl; std::cout << "Build project" << std::endl;
std::string makeCommand = m_CTest->GetDartConfiguration("MakeCommand"); std::string makeCommand = m_CTest->GetDartConfiguration("MakeCommand");
if ( makeCommand.size() == 0 ) if ( makeCommand.size() == 0 )

View File

@ -19,31 +19,25 @@
#define cmCTestBuildHandler_h #define cmCTestBuildHandler_h
#include "cmStandardIncludes.h" #include "cmCTestGenericHandler.h"
#include "cmListFileCache.h" #include "cmListFileCache.h"
#include <cmsys/RegularExpression.hxx> #include <cmsys/RegularExpression.hxx>
class cmCTest;
class cmMakefile; class cmMakefile;
/** \class cmCTestBuildHandler /** \class cmCTestBuildHandler
* \brief A class that handles ctest -S invocations * \brief A class that handles ctest -S invocations
* *
*/ */
class cmCTestBuildHandler class cmCTestBuildHandler : public cmCTestGenericHandler
{ {
public: public:
/* /*
* The main entry point for this class * The main entry point for this class
*/ */
int BuildDirectory(cmCTest *); int BuildDirectory();
/*
* If verbose then more informaiton is printed out
*/
void SetVerbose(bool val) { m_Verbose = val; }
cmCTestBuildHandler(); cmCTestBuildHandler();
@ -77,9 +71,6 @@ private:
double elapsed_time); double elapsed_time);
bool m_Verbose;
cmCTest *m_CTest;
std::string m_StartBuild; std::string m_StartBuild;
std::string m_EndBuild; std::string m_EndBuild;

View File

@ -34,10 +34,8 @@ cmCTestConfigureHandler::cmCTestConfigureHandler()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
//clearly it would be nice if this were broken up into a few smaller //clearly it would be nice if this were broken up into a few smaller
//functions and commented... //functions and commented...
int cmCTestConfigureHandler::ConfigureDirectory(cmCTest *ctest_inst) int cmCTestConfigureHandler::ConfigureDirectory()
{ {
m_CTest = ctest_inst;
std::cout << "Configure project" << std::endl; std::cout << "Configure project" << std::endl;
std::string cCommand = m_CTest->GetDartConfiguration("ConfigureCommand"); std::string cCommand = m_CTest->GetDartConfiguration("ConfigureCommand");
if ( cCommand.size() == 0 ) if ( cCommand.size() == 0 )

View File

@ -19,35 +19,23 @@
#define cmCTestConfigureHandler_h #define cmCTestConfigureHandler_h
#include "cmStandardIncludes.h" #include "cmCTestGenericHandler.h"
#include "cmListFileCache.h" #include "cmListFileCache.h"
class cmCTest;
/** \class cmCTestConfigureHandler /** \class cmCTestConfigureHandler
* \brief A class that handles ctest -S invocations * \brief A class that handles ctest -S invocations
* *
*/ */
class cmCTestConfigureHandler class cmCTestConfigureHandler : public cmCTestGenericHandler
{ {
public: public:
/* /*
* The main entry point for this class * The main entry point for this class
*/ */
int ConfigureDirectory(cmCTest *); int ConfigureDirectory();
/*
* If verbose then more informaiton is printed out
*/
void SetVerbose(bool val) { m_Verbose = val; }
cmCTestConfigureHandler(); cmCTestConfigureHandler();
private:
bool m_Verbose;
cmCTest *m_CTest;
}; };
#endif #endif

View File

@ -154,10 +154,8 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file, const char* src
//---------------------------------------------------------------------- //----------------------------------------------------------------------
//clearly it would be nice if this were broken up into a few smaller //clearly it would be nice if this were broken up into a few smaller
//functions and commented... //functions and commented...
int cmCTestCoverageHandler::CoverageDirectory(cmCTest *ctest_inst) int cmCTestCoverageHandler::CoverageDirectory()
{ {
m_CTest = ctest_inst;
int error = 0; int error = 0;
std::string sourceDir = m_CTest->GetDartConfiguration("SourceDirectory"); std::string sourceDir = m_CTest->GetDartConfiguration("SourceDirectory");

View File

@ -19,35 +19,27 @@
#define cmCTestCoverageHandler_h #define cmCTestCoverageHandler_h
#include "cmStandardIncludes.h" #include "cmCTestGenericHandler.h"
#include "cmListFileCache.h" #include "cmListFileCache.h"
class cmCTest;
class cmGeneratedFileStream; class cmGeneratedFileStream;
/** \class cmCTestCoverageHandler /** \class cmCTestCoverageHandler
* \brief A class that handles coverage computaiton for ctest * \brief A class that handles coverage computaiton for ctest
* *
*/ */
class cmCTestCoverageHandler class cmCTestCoverageHandler : public cmCTestGenericHandler
{ {
public: public:
/* /*
* The main entry point for this class * The main entry point for this class
*/ */
int CoverageDirectory(cmCTest *); int CoverageDirectory();
/*
* If verbose then more informaiton is printed out
*/
void SetVerbose(bool val) { m_Verbose = val; }
cmCTestCoverageHandler(); cmCTestCoverageHandler();
private: private:
bool m_Verbose;
cmCTest *m_CTest;
bool ShouldIDoCoverage(const char* file, const char* srcDir, bool ShouldIDoCoverage(const char* file, const char* srcDir,
const char* binDir, bool verbose); const char* binDir, bool verbose);
bool StartLogFile(cmGeneratedFileStream& ostr, int logFileCount); bool StartLogFile(cmGeneratedFileStream& ostr, int logFileCount);

View File

@ -0,0 +1,25 @@
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "cmCTestGenericHandler.h"
cmCTestGenericHandler::cmCTestGenericHandler()
{
m_Verbose = false;
m_CTest = 0;
}

View File

@ -0,0 +1,60 @@
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Kitware, Inc. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef cmCTestGenericHandler_h
#define cmCTestGenericHandler_h
#include "cmStandardIncludes.h"
class cmCTest;
class cmMakefile;
/** \class cmCTestGenericHandler
* \brief A superclass of all CTest Handlers
*
*/
class cmCTestGenericHandler
{
public:
/**
* If verbose then more informaiton is printed out
*/
void SetVerbose(bool val) { m_Verbose = val; }
/**
* Populate internals from CTest custom scripts
*/
void PopulateCustomVectors(cmMakefile *) {}
/**
* Set the CTest instance
*/
void SetCTestInstance(cmCTest* ctest) { m_CTest = ctest; }
/**
* Construct handler
*/
cmCTestGenericHandler();
protected:
bool m_Verbose;
cmCTest *m_CTest;
};
#endif

View File

@ -125,7 +125,7 @@ void cmCTestScriptHandler::AddConfigurationScript(const char *script)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// the generic entry point for handling scripts, this routine will run all // the generic entry point for handling scripts, this routine will run all
// the scripts provides a -S arguments // the scripts provides a -S arguments
int cmCTestScriptHandler::RunConfigurationScript(cmCTest* ctest) int cmCTestScriptHandler::RunConfigurationScript()
{ {
int res = 0; int res = 0;
std::vector<cmStdString>::iterator it; std::vector<cmStdString>::iterator it;
@ -134,7 +134,7 @@ int cmCTestScriptHandler::RunConfigurationScript(cmCTest* ctest)
it ++ ) it ++ )
{ {
// for each script run it // for each script run it
res += this->RunConfigurationScript(ctest, res += this->RunConfigurationScript(
cmSystemTools::CollapseFullPath(it->c_str())); cmSystemTools::CollapseFullPath(it->c_str()));
} }
return res; return res;
@ -157,8 +157,7 @@ void cmCTestScriptHandler::UpdateElapsedTime()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// this sets up some variables for thew script to use, creates the required // this sets up some variables for thew script to use, creates the required
// cmake instance and generators, and then reads in the script // cmake instance and generators, and then reads in the script
int cmCTestScriptHandler::ReadInScript(cmCTest* ctest, int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
const std::string& total_script_arg)
{ {
// if the argument has a , in it then it needs to be broken into the fist // if the argument has a , in it then it needs to be broken into the fist
// argument (which is the script) and the second argument which will be // argument (which is the script) and the second argument which will be
@ -201,7 +200,7 @@ int cmCTestScriptHandler::ReadInScript(cmCTest* ctest,
cmSystemTools::GetFilenameName( cmSystemTools::GetFilenameName(
script).c_str()); script).c_str());
m_LocalGenerator->GetMakefile()->AddDefinition("CTEST_EXECUTABLE_NAME", m_LocalGenerator->GetMakefile()->AddDefinition("CTEST_EXECUTABLE_NAME",
ctest->GetCTestExecutable()); m_CTest->GetCTestExecutable());
this->UpdateElapsedTime(); this->UpdateElapsedTime();
@ -209,15 +208,15 @@ int cmCTestScriptHandler::ReadInScript(cmCTest* ctest,
// for ctest commands to clean this up. If a couple more commands are // for ctest commands to clean this up. If a couple more commands are
// created with the same format lets do that - ken // created with the same format lets do that - ken
cmCTestCommand* newCom = new cmCTestRunScriptCommand; cmCTestCommand* newCom = new cmCTestRunScriptCommand;
newCom->m_CTest = ctest; newCom->m_CTest = m_CTest;
newCom->m_CTestScriptHandler = this; newCom->m_CTestScriptHandler = this;
m_CMake->AddCommand(newCom); m_CMake->AddCommand(newCom);
newCom = new cmCTestEmptyBinaryDirectoryCommand; newCom = new cmCTestEmptyBinaryDirectoryCommand;
newCom->m_CTest = ctest; newCom->m_CTest = m_CTest;
newCom->m_CTestScriptHandler = this; newCom->m_CTestScriptHandler = this;
m_CMake->AddCommand(newCom); m_CMake->AddCommand(newCom);
newCom = new cmCTestSleepCommand; newCom = new cmCTestSleepCommand;
newCom->m_CTest = ctest; newCom->m_CTest = m_CTest;
newCom->m_CTestScriptHandler = this; newCom->m_CTestScriptHandler = this;
m_CMake->AddCommand(newCom); m_CMake->AddCommand(newCom);
@ -349,8 +348,7 @@ void cmCTestScriptHandler::SleepInSeconds(unsigned int secondsToWait)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// run a specific script // run a specific script
int cmCTestScriptHandler::RunConfigurationScript(cmCTest* ctest, int cmCTestScriptHandler::RunConfigurationScript(const std::string& total_script_arg)
const std::string& total_script_arg)
{ {
int result; int result;
@ -358,7 +356,7 @@ int cmCTestScriptHandler::RunConfigurationScript(cmCTest* ctest,
cmSystemTools::GetTime(); cmSystemTools::GetTime();
// read in the script // read in the script
result = this->ReadInScript(ctest, total_script_arg); result = this->ReadInScript(total_script_arg);
if (result) if (result)
{ {
return result; return result;
@ -761,11 +759,12 @@ void cmCTestScriptHandler::RestoreBackupDirectories()
} }
} }
bool cmCTestScriptHandler::RunScript(cmCTest *ctest, const char *sname) bool cmCTestScriptHandler::RunScript(cmCTest* ctest, const char *sname)
{ {
cmCTestScriptHandler* sh = new cmCTestScriptHandler(); cmCTestScriptHandler* sh = new cmCTestScriptHandler();
sh->SetCTestInstance(ctest);
sh->AddConfigurationScript(sname); sh->AddConfigurationScript(sname);
sh->RunConfigurationScript(ctest); sh->RunConfigurationScript();
delete sh; delete sh;
return true; return true;
} }

View File

@ -19,14 +19,13 @@
#define cmCTestScriptHandler_h #define cmCTestScriptHandler_h
#include "cmStandardIncludes.h" #include "cmCTestGenericHandler.h"
#include "cmListFileCache.h" #include "cmListFileCache.h"
class cmMakefile; class cmMakefile;
class cmLocalGenerator; class cmLocalGenerator;
class cmGlobalGenerator; class cmGlobalGenerator;
class cmake; class cmake;
class cmCTest;
/** \class cmCTestScriptHandler /** \class cmCTestScriptHandler
* \brief A class that handles ctest -S invocations * \brief A class that handles ctest -S invocations
@ -63,7 +62,7 @@ class cmCTest;
* CTEST_SCRIPT_NAME * CTEST_SCRIPT_NAME
* *
*/ */
class cmCTestScriptHandler class cmCTestScriptHandler : public cmCTestGenericHandler
{ {
public: public:
@ -75,12 +74,7 @@ public:
/** /**
* Run a dashboard using a specified confiuration script * Run a dashboard using a specified confiuration script
*/ */
int RunConfigurationScript(cmCTest* ctest); int RunConfigurationScript();
/*
* If verbose then more informaiton is printed out
*/
void SetVerbose(bool val) { m_Verbose = val; }
/* /*
* Run a script * Run a script
@ -104,7 +98,7 @@ public:
private: private:
// reads in a script // reads in a script
int ReadInScript(cmCTest* ctest, const std::string& total_script_arg); int ReadInScript(const std::string& total_script_arg);
// extract vars from the script to set ivars // extract vars from the script to set ivars
int ExtractVariables(); int ExtractVariables();
@ -119,12 +113,11 @@ private:
int BackupDirectories(); int BackupDirectories();
void RestoreBackupDirectories(); void RestoreBackupDirectories();
int RunConfigurationScript(cmCTest* ctest, const std::string& script); int RunConfigurationScript(const std::string& script);
int RunConfigurationDashboard(); int RunConfigurationDashboard();
std::vector<cmStdString> m_ConfigurationScripts; std::vector<cmStdString> m_ConfigurationScripts;
bool m_Verbose;
bool m_Backup; bool m_Backup;
bool m_EmptyBinDir; bool m_EmptyBinDir;
bool m_EmptyBinDirOnce; bool m_EmptyBinDirOnce;

View File

@ -192,8 +192,6 @@ inline int GetNextRealNumber(std::string const& in,
//---------------------------------------------------------------------- //----------------------------------------------------------------------
cmCTestTestHandler::cmCTestTestHandler() cmCTestTestHandler::cmCTestTestHandler()
{ {
m_Verbose = false;
m_CTest = 0;
m_UseUnion = false; m_UseUnion = false;
m_UseIncludeRegExp = false; m_UseIncludeRegExp = false;
@ -234,10 +232,8 @@ void cmCTestTestHandler::PopulateCustomVectors(cmMakefile *mf)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
//clearly it would be nice if this were broken up into a few smaller //clearly it would be nice if this were broken up into a few smaller
//functions and commented... //functions and commented...
int cmCTestTestHandler::TestDirectory(cmCTest *ctest_inst, bool memcheck) int cmCTestTestHandler::TestDirectory(bool memcheck)
{ {
m_CTest = ctest_inst;
m_TestResults.clear(); m_TestResults.clear();
std::cout << (memcheck ? "Memory check" : "Test") << " project" << std::endl; std::cout << (memcheck ? "Memory check" : "Test") << " project" << std::endl;
if ( memcheck ) if ( memcheck )

View File

@ -19,29 +19,23 @@
#define cmCTestTestHandler_h #define cmCTestTestHandler_h
#include "cmStandardIncludes.h" #include "cmCTestGenericHandler.h"
#include "cmListFileCache.h" #include "cmListFileCache.h"
class cmCTest;
class cmMakefile; class cmMakefile;
/** \class cmCTestTestHandler /** \class cmCTestTestHandler
* \brief A class that handles ctest -S invocations * \brief A class that handles ctest -S invocations
* *
*/ */
class cmCTestTestHandler class cmCTestTestHandler : public cmCTestGenericHandler
{ {
public: public:
/* /*
* The main entry point for this class * The main entry point for this class
*/ */
int TestDirectory(cmCTest *, bool memcheck); int TestDirectory(bool memcheck);
/*
* If verbose then more informaiton is printed out
*/
void SetVerbose(bool val) { m_Verbose = val; }
/* /*
* When both -R and -I are used should te resulting test list be the * When both -R and -I are used should te resulting test list be the
@ -114,9 +108,6 @@ private:
COMPLETED COMPLETED
}; };
bool m_Verbose;
cmCTest *m_CTest;
std::string m_MemoryTester; std::string m_MemoryTester;
std::vector<cmStdString> m_MemoryTesterOptionsParsed; std::vector<cmStdString> m_MemoryTesterOptionsParsed;
std::string m_MemoryTesterOptions; std::string m_MemoryTesterOptions;

View File

@ -49,10 +49,8 @@ cmCTestUpdateHandler::cmCTestUpdateHandler()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
//clearly it would be nice if this were broken up into a few smaller //clearly it would be nice if this were broken up into a few smaller
//functions and commented... //functions and commented...
int cmCTestUpdateHandler::UpdateDirectory(cmCTest *ctest_inst) int cmCTestUpdateHandler::UpdateDirectory()
{ {
m_CTest = ctest_inst;
int count = 0; int count = 0;
std::string::size_type cc, kk; std::string::size_type cc, kk;
std::string cvsCommand = m_CTest->GetDartConfiguration("CVSCommand"); std::string cvsCommand = m_CTest->GetDartConfiguration("CVSCommand");

View File

@ -19,35 +19,25 @@
#define cmCTestUpdateHandler_h #define cmCTestUpdateHandler_h
#include "cmStandardIncludes.h" #include "cmCTestGenericHandler.h"
#include "cmListFileCache.h" #include "cmListFileCache.h"
class cmCTest;
/** \class cmCTestUpdateHandler /** \class cmCTestUpdateHandler
* \brief A class that handles ctest -S invocations * \brief A class that handles ctest -S invocations
* *
*/ */
class cmCTestUpdateHandler class cmCTestUpdateHandler : public cmCTestGenericHandler
{ {
public: public:
/* /*
* The main entry point for this class * The main entry point for this class
*/ */
int UpdateDirectory(cmCTest *); int UpdateDirectory();
/*
* If verbose then more informaiton is printed out
*/
void SetVerbose(bool val) { m_Verbose = val; }
cmCTestUpdateHandler(); cmCTestUpdateHandler();
private: private:
bool m_Verbose;
cmCTest *m_CTest;
// Some structures needed for cvs update // Some structures needed for cvs update
struct StringPair : struct StringPair :
public std::pair<std::string, std::string>{}; public std::pair<std::string, std::string>{};

View File

@ -246,6 +246,13 @@ cmCTest::cmCTest()
this->TestHandler = new cmCTestTestHandler; this->TestHandler = new cmCTestTestHandler;
this->UpdateHandler = new cmCTestUpdateHandler; this->UpdateHandler = new cmCTestUpdateHandler;
this->ConfigureHandler = new cmCTestConfigureHandler; this->ConfigureHandler = new cmCTestConfigureHandler;
this->BuildHandler->SetCTestInstance(this);
this->CoverageHandler->SetCTestInstance(this);
this->ScriptHandler->SetCTestInstance(this);
this->TestHandler->SetCTestInstance(this);
this->UpdateHandler->SetCTestInstance(this);
this->ConfigureHandler->SetCTestInstance(this);
} }
cmCTest::~cmCTest() cmCTest::~cmCTest()
@ -720,7 +727,7 @@ int cmCTest::ProcessTests()
} }
if ( m_Tests[UPDATE_TEST] || m_Tests[ALL_TEST] ) if ( m_Tests[UPDATE_TEST] || m_Tests[ALL_TEST] )
{ {
update_count = this->UpdateHandler->UpdateDirectory(this); update_count = this->UpdateHandler->UpdateDirectory();
if ( update_count < 0 ) if ( update_count < 0 )
{ {
res |= cmCTest::UPDATE_ERRORS; res |= cmCTest::UPDATE_ERRORS;
@ -732,7 +739,7 @@ int cmCTest::ProcessTests()
} }
if ( m_Tests[CONFIGURE_TEST] || m_Tests[ALL_TEST] ) if ( m_Tests[CONFIGURE_TEST] || m_Tests[ALL_TEST] )
{ {
if (this->ConfigureHandler->ConfigureDirectory(this)) if (this->ConfigureHandler->ConfigureDirectory())
{ {
res |= cmCTest::CONFIGURE_ERRORS; res |= cmCTest::CONFIGURE_ERRORS;
} }
@ -740,7 +747,7 @@ int cmCTest::ProcessTests()
if ( m_Tests[BUILD_TEST] || m_Tests[ALL_TEST] ) if ( m_Tests[BUILD_TEST] || m_Tests[ALL_TEST] )
{ {
this->UpdateCTestConfiguration(); this->UpdateCTestConfiguration();
if (this->BuildHandler->BuildDirectory(this)) if (this->BuildHandler->BuildDirectory())
{ {
res |= cmCTest::BUILD_ERRORS; res |= cmCTest::BUILD_ERRORS;
} }
@ -748,7 +755,7 @@ int cmCTest::ProcessTests()
if ( m_Tests[TEST_TEST] || m_Tests[ALL_TEST] || notest ) if ( m_Tests[TEST_TEST] || m_Tests[ALL_TEST] || notest )
{ {
this->UpdateCTestConfiguration(); this->UpdateCTestConfiguration();
if (this->TestHandler->TestDirectory(this,false)) if (this->TestHandler->TestDirectory(false))
{ {
res |= cmCTest::TEST_ERRORS; res |= cmCTest::TEST_ERRORS;
} }
@ -756,7 +763,7 @@ int cmCTest::ProcessTests()
if ( m_Tests[COVERAGE_TEST] || m_Tests[ALL_TEST] ) if ( m_Tests[COVERAGE_TEST] || m_Tests[ALL_TEST] )
{ {
this->UpdateCTestConfiguration(); this->UpdateCTestConfiguration();
if (this->CoverageHandler->CoverageDirectory(this)) if (this->CoverageHandler->CoverageDirectory())
{ {
res |= cmCTest::COVERAGE_ERRORS; res |= cmCTest::COVERAGE_ERRORS;
} }
@ -764,7 +771,7 @@ int cmCTest::ProcessTests()
if ( m_Tests[MEMCHECK_TEST] || m_Tests[ALL_TEST] ) if ( m_Tests[MEMCHECK_TEST] || m_Tests[ALL_TEST] )
{ {
this->UpdateCTestConfiguration(); this->UpdateCTestConfiguration();
if (this->TestHandler->TestDirectory(this,true)) if (this->TestHandler->TestDirectory(true))
{ {
res |= cmCTest::MEMORY_ERRORS; res |= cmCTest::MEMORY_ERRORS;
} }
@ -1600,7 +1607,7 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
// call process directory // call process directory
if (this->m_RunConfigurationScript) if (this->m_RunConfigurationScript)
{ {
res = this->ScriptHandler->RunConfigurationScript(this); res = this->ScriptHandler->RunConfigurationScript();
} }
else else
{ {