ENH: Add a way to force ctest to be a new process

This commit is contained in:
Andy Cedilnik 2004-05-10 17:44:29 -04:00
parent 26e8d63b80
commit 9255e40d81
2 changed files with 8 additions and 1 deletions

View File

@ -348,6 +348,7 @@ bool TryExecutable(const char *dir, const char *file,
cmCTest::cmCTest() cmCTest::cmCTest()
{ {
m_ForceNewCTestProcess = false;
m_TomorrowTag = false; m_TomorrowTag = false;
m_BuildNoCMake = false; m_BuildNoCMake = false;
m_BuildNoClean = false; m_BuildNoClean = false;
@ -3330,7 +3331,7 @@ int cmCTest::RunMakeCommand(const char* command, std::string* output,
int cmCTest::RunTest(std::vector<const char*> argv, std::string* output, int *retVal, int cmCTest::RunTest(std::vector<const char*> argv, std::string* output, int *retVal,
std::ostream* log) std::ostream* log)
{ {
if(cmSystemTools::SameFile(argv[0], m_CTestSelf.c_str())) if(cmSystemTools::SameFile(argv[0], m_CTestSelf.c_str()) && !m_ForceNewCTestProcess)
{ {
cmCTest inst; cmCTest inst;
inst.m_ConfigType = m_ConfigType; inst.m_ConfigType = m_ConfigType;
@ -4171,6 +4172,10 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
{ {
m_TomorrowTag = true; m_TomorrowTag = true;
} }
if( arg.find("--force-new-ctest-process",0) == 0 )
{
m_ForceNewCTestProcess = true;
}
if( arg.find("--interactive-debug-mode",0) == 0 && i < args.size() - 1 ) if( arg.find("--interactive-debug-mode",0) == 0 && i < args.size() - 1 )
{ {
i++; i++;

View File

@ -142,6 +142,8 @@ public:
bool m_DartMode; bool m_DartMode;
bool m_ShowOnly; bool m_ShowOnly;
bool m_ForceNewCTestProcess;
bool m_RunConfigurationScript; bool m_RunConfigurationScript;
tm_VectorOfStrings m_ConfigurationScripts; tm_VectorOfStrings m_ConfigurationScripts;