summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmCTest.cxx13
-rw-r--r--Source/cmCTest.h11
2 files changed, 15 insertions, 9 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."
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index 47023f1..652b1c4 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -93,8 +93,6 @@ public:
/**
* Initialize and finalize testing
*/
- int Initialize(const char* binary_dir, bool new_tag = false,
- bool verbose_tag = true);
bool InitializeFromCommand(cmCTestCommand* command, bool first = false);
void Finalize();
@@ -446,6 +444,15 @@ private:
void BlockTestErrorDiagnostics();
+ /**
+ * Initialize a dashboard run in the given build tree. The "script"
+ * argument is true when running from a command-driven (ctest_start)
+ * dashboard script, and false when running from the CTest command
+ * line. Note that a declarative dashboard script does not actually
+ * call this method because it sets CTEST_COMMAND to drive a build
+ * through the ctest command line.
+ */
+ int Initialize(const char* binary_dir, bool script);
//! parse the option after -D and convert it into the appropriate steps
bool AddTestsForDashboardType(std::string &targ);