summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-02-17 21:11:10 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-02-17 21:11:10 (GMT)
commitd5aafe1b93a72e72803bd636f460e0c93a78aa9e (patch)
treeff6b58f8c081acb08b9aac41d06ea713cc0a9f9f
parent79a7f42a218958a44158a023ba21b08f3808ec08 (diff)
downloadCMake-d5aafe1b93a72e72803bd636f460e0c93a78aa9e.zip
CMake-d5aafe1b93a72e72803bd636f460e0c93a78aa9e.tar.gz
CMake-d5aafe1b93a72e72803bd636f460e0c93a78aa9e.tar.bz2
ENH: Some more generalization
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx17
-rw-r--r--Source/cmCTest.cxx28
2 files changed, 28 insertions, 17 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index dcc4645..9e4be52 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -199,6 +199,23 @@ int cmCTestTestHandler::PostProcessHandler()
//functions and commented...
int cmCTestTestHandler::ProcessHandler()
{
+ // Update internal data structure from generic one
+ this->SetTestsToRunInformation(this->GetOption("TestsToRunInformation"));
+ this->SetUseUnion(cmSystemTools::IsOn(this->GetOption("UseUnion")));
+ const char* val;
+ val = this->GetOption("IncludeRegularExpression");
+ if ( val )
+ {
+ this->UseIncludeRegExp();
+ this->SetIncludeRegExp(val);
+ }
+ val = this->GetOption("ExcludeRegularExpression");
+ if ( val )
+ {
+ this->UseExcludeRegExp();
+ this->SetExcludeRegExp(val);
+ }
+
m_TestResults.clear();
std::cout << (m_MemCheck ? "Memory check" : "Test") << " project" << std::endl;
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 56f912f..24db304 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -768,7 +768,7 @@ int cmCTest::ProcessTests()
}
if ( m_Tests[CONFIGURE_TEST] || m_Tests[ALL_TEST] )
{
- if (m_TestingHandlers["configure"]->ProcessHandler() < 0)
+ if (this->GetHandler("configure")->ProcessHandler() < 0)
{
res |= cmCTest::CONFIGURE_ERRORS;
}
@@ -776,7 +776,7 @@ int cmCTest::ProcessTests()
if ( m_Tests[BUILD_TEST] || m_Tests[ALL_TEST] )
{
this->UpdateCTestConfiguration();
- if (m_TestingHandlers["build"]->ProcessHandler() < 0)
+ if (this->GetHandler("build")->ProcessHandler() < 0)
{
res |= cmCTest::BUILD_ERRORS;
}
@@ -784,7 +784,7 @@ int cmCTest::ProcessTests()
if ( m_Tests[TEST_TEST] || m_Tests[ALL_TEST] || notest )
{
this->UpdateCTestConfiguration();
- if (m_TestingHandlers["test"]->ProcessHandler() < 0)
+ if (this->GetHandler("test")->ProcessHandler() < 0)
{
res |= cmCTest::TEST_ERRORS;
}
@@ -792,7 +792,7 @@ int cmCTest::ProcessTests()
if ( m_Tests[COVERAGE_TEST] || m_Tests[ALL_TEST] )
{
this->UpdateCTestConfiguration();
- if (m_TestingHandlers["coverage"]->ProcessHandler() < 0)
+ if (this->GetHandler("coverage")->ProcessHandler() < 0)
{
res |= cmCTest::COVERAGE_ERRORS;
}
@@ -800,7 +800,7 @@ int cmCTest::ProcessTests()
if ( m_Tests[MEMCHECK_TEST] || m_Tests[ALL_TEST] )
{
this->UpdateCTestConfiguration();
- if (m_TestingHandlers["memcheck"]->ProcessHandler() < 0)
+ if (this->GetHandler("memcheck")->ProcessHandler() < 0)
{
res |= cmCTest::MEMORY_ERRORS;
}
@@ -1226,7 +1226,7 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
{
this->m_RunConfigurationScript = true;
i++;
- cmCTestScriptHandler* ch = static_cast<cmCTestScriptHandler*>(m_TestingHandlers["script"]);
+ cmCTestScriptHandler* ch = static_cast<cmCTestScriptHandler*>(this->GetHandler("script"));
ch->AddConfigurationScript(args[i].c_str());
}
@@ -1497,28 +1497,22 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
if(arg.find("-I",0) == 0 && i < args.size() - 1)
{
i++;
- cmCTestTestHandler* th = static_cast<cmCTestTestHandler*>(m_TestingHandlers["test"]);
- th->SetTestsToRunInformation(args[i].c_str());
+ this->GetHandler("test")->SetOption("TestsToRunInformation", args[i].c_str());
}
if(arg.find("-U",0) == 0)
{
- cmCTestTestHandler* th = static_cast<cmCTestTestHandler*>(m_TestingHandlers["test"]);
- th->SetUseUnion(true);
+ this->GetHandler("test")->SetOption("UseUnion", "true");
}
if(arg.find("-R",0) == 0 && i < args.size() - 1)
{
- cmCTestTestHandler* th = static_cast<cmCTestTestHandler*>(m_TestingHandlers["test"]);
- th->UseIncludeRegExp();
i++;
- th->SetIncludeRegExp(args[i].c_str());
+ this->GetHandler("test")->SetOption("IncludeRegularExpression", args[i].c_str());
}
if(arg.find("-E",0) == 0 && i < args.size() - 1)
{
- cmCTestTestHandler* th = static_cast<cmCTestTestHandler*>(m_TestingHandlers["test"]);
- th->UseExcludeRegExp();
i++;
- th->SetExcludeRegExp(args[i].c_str());
+ this->GetHandler("test")->SetOption("ExcludeRegularExpression", args[i].c_str());
}
if(arg.find("-A",0) == 0 && i < args.size() - 1)
@@ -1640,7 +1634,7 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
// call process directory
if (this->m_RunConfigurationScript)
{
- res = m_TestingHandlers["script"]->ProcessHandler();
+ res = this->GetHandler("script")->ProcessHandler();
}
else
{