summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-11-24 13:58:48 (GMT)
committerBrad King <brad.king@kitware.com>2009-11-24 13:58:48 (GMT)
commitc2ba35787e4f710d7424c30c61efd1d386d0d619 (patch)
tree16e8166e4df7d7bb1ce847b1b4946037a5bec51d /Source/cmCTest.cxx
parenta03f801f7f8d6d244623ce373ea583b95443bb9a (diff)
downloadCMake-c2ba35787e4f710d7424c30c61efd1d386d0d619.zip
CMake-c2ba35787e4f710d7424c30c61efd1d386d0d619.tar.gz
CMake-c2ba35787e4f710d7424c30c61efd1d386d0d619.tar.bz2
CTest: Simplify Initialize method signature
We make the cmCTest::Initialize method private since it is only called from inside the class implementation. We also combine the two boolean arguments into one since they both meant the same thing.
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index fee94d1..e00c8da 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -311,8 +311,7 @@ cmCTest::Part cmCTest::GetPartFromName(const char* name)
}
//----------------------------------------------------------------------
-int cmCTest::Initialize(const char* binary_dir, bool new_tag,
- bool verbose_tag)
+int cmCTest::Initialize(const char* binary_dir, bool script)
{
cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
if(!this->InteractiveDebugMode)
@@ -416,7 +415,7 @@ int cmCTest::Initialize(const char* binary_dir, bool new_tag,
}
tfin.close();
}
- if (tag.size() == 0 || new_tag || this->Parts[PartStart])
+ if (tag.size() == 0 || script || this->Parts[PartStart])
{
cmCTestLog(this, DEBUG, "TestModel: " << this->GetTestModelString()
<< std::endl);
@@ -441,7 +440,7 @@ int cmCTest::Initialize(const char* binary_dir, bool new_tag,
ofs << this->GetTestModelString() << std::endl;
}
ofs.close();
- if ( verbose_tag )
+ if ( !script )
{
cmCTestLog(this, OUTPUT, "Create new tag: " << tag << " - "
<< this->GetTestModelString() << std::endl);
@@ -517,7 +516,7 @@ bool cmCTest::InitializeFromCommand(cmCTestCommand* command, bool first)
}
}
- if ( !this->Initialize(bld_dir.c_str(), true, false) )
+ if ( !this->Initialize(bld_dir.c_str(), true) )
{
if ( this->GetCTestConfiguration("NightlyStartTime").empty() && first)
{
@@ -2113,8 +2112,8 @@ int cmCTest::Run(std::vector<std::string> &args, std::string* output)
it->second->SetVerbose(this->Verbose);
it->second->SetSubmitIndex(this->SubmitIndex);
}
- if ( !this->Initialize(
- cmSystemTools::GetCurrentWorkingDirectory().c_str()) )
+ std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
+ if(!this->Initialize(cwd.c_str(), false))
{
res = 12;
cmCTestLog(this, ERROR_MESSAGE, "Problem initializing the dashboard."