summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CTest/cmCTestConfigureCommand.cxx12
-rw-r--r--Source/CTest/cmCTestHandlerCommand.cxx12
-rw-r--r--Source/CTest/cmCTestStartCommand.cxx6
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx7
-rw-r--r--Source/CTest/cmCTestUpdateCommand.cxx6
-rw-r--r--Source/cmCTest.cxx7
6 files changed, 36 insertions, 14 deletions
diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx
index 9a30fe8..ce2ff3c 100644
--- a/Source/CTest/cmCTestConfigureCommand.cxx
+++ b/Source/CTest/cmCTestConfigureCommand.cxx
@@ -24,22 +24,26 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
if ( this->Values[ct_BUILD] )
{
this->CTest->SetCTestConfiguration("BuildDirectory",
- this->Values[ct_BUILD]);
+ cmSystemTools::CollapseFullPath(
+ this->Values[ct_BUILD]).c_str());
}
else
{
this->CTest->SetCTestConfiguration("BuildDirectory",
- this->Makefile->GetDefinition("CTEST_BINARY_DIRECTORY"));
+ cmSystemTools::CollapseFullPath(
+ this->Makefile->GetDefinition("CTEST_BINARY_DIRECTORY")).c_str());
}
if ( this->Values[ct_SOURCE] )
{
this->CTest->SetCTestConfiguration("SourceDirectory",
- this->Values[ct_SOURCE]);
+ cmSystemTools::CollapseFullPath(
+ this->Values[ct_SOURCE]).c_str());
}
else
{
this->CTest->SetCTestConfiguration("SourceDirectory",
- this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY"));
+ cmSystemTools::CollapseFullPath(
+ this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY")).c_str());
}
if ( this->CTest->GetCTestConfiguration("BuildDirectory").empty() )
{
diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx
index 09fd82a..2313569 100644
--- a/Source/CTest/cmCTestHandlerCommand.cxx
+++ b/Source/CTest/cmCTestHandlerCommand.cxx
@@ -58,24 +58,28 @@ bool cmCTestHandlerCommand::InitialPass(
if ( this->Values[ct_BUILD] )
{
this->CTest->SetCTestConfiguration("BuildDirectory",
- this->Values[ct_BUILD]);
+ cmSystemTools::CollapseFullPath(
+ this->Values[ct_BUILD]).c_str());
}
else
{
this->CTest->SetCTestConfiguration("BuildDirectory",
- this->Makefile->GetDefinition("CTEST_BINARY_DIRECTORY"));
+ cmSystemTools::CollapseFullPath(
+ this->Makefile->GetDefinition("CTEST_BINARY_DIRECTORY")).c_str());
}
if ( this->Values[ct_SOURCE] )
{
cmCTestLog(this->CTest, DEBUG,
"Set source directory to: " << this->Values[ct_SOURCE] << std::endl);
this->CTest->SetCTestConfiguration("SourceDirectory",
- this->Values[ct_SOURCE]);
+ cmSystemTools::CollapseFullPath(
+ this->Values[ct_SOURCE]).c_str());
}
else
{
this->CTest->SetCTestConfiguration("SourceDirectory",
- this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY"));
+ cmSystemTools::CollapseFullPath(
+ this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY")).c_str());
}
if ( this->Values[ct_SUBMIT_INDEX] )
{
diff --git a/Source/CTest/cmCTestStartCommand.cxx b/Source/CTest/cmCTestStartCommand.cxx
index aa77c75..30aff0b 100644
--- a/Source/CTest/cmCTestStartCommand.cxx
+++ b/Source/CTest/cmCTestStartCommand.cxx
@@ -77,8 +77,10 @@ bool cmCTestStartCommand::InitialPass(
return false;
}
this->CTest->EmptyCTestConfiguration();
- this->CTest->SetCTestConfiguration("SourceDirectory", src_dir);
- this->CTest->SetCTestConfiguration("BuildDirectory", bld_dir);
+ this->CTest->SetCTestConfiguration("SourceDirectory",
+ cmSystemTools::CollapseFullPath(src_dir).c_str());
+ this->CTest->SetCTestConfiguration("BuildDirectory",
+ cmSystemTools::CollapseFullPath(bld_dir).c_str());
cmCTestLog(this->CTest, HANDLER_OUTPUT, "Run dashboard with model "
<< smodel << std::endl
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 1b4968d..7497f44 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -72,6 +72,7 @@ public:
//----------------------------------------------------------------------
bool cmCTestSubdirCommand::InitialPass(std::vector<std::string> const& args)
{
+#undef cout
if(args.size() < 1 )
{
this->SetError("called with incorrect number of arguments");
@@ -79,9 +80,11 @@ bool cmCTestSubdirCommand::InitialPass(std::vector<std::string> const& args)
}
std::vector<std::string>::const_iterator it;
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
+ std::cout << __LINE__ << " Current directory: " << cwd.c_str() << std::endl;
for ( it = args.begin(); it != args.end(); ++ it )
{
cmSystemTools::ChangeDirectory(cwd.c_str());
+ std::cout << __LINE__ << " Current directory: " << cwd.c_str() << std::endl;
std::string fname = cwd;
fname += "/";
fname += *it;
@@ -92,6 +95,7 @@ bool cmCTestSubdirCommand::InitialPass(std::vector<std::string> const& args)
continue;
}
cmSystemTools::ChangeDirectory(fname.c_str());
+ std::cout << __LINE__ << " Current directory: " << fname.c_str() << std::endl;
const char* testFilename;
if( cmSystemTools::FileExists("CTestTestfile.cmake") )
{
@@ -1655,6 +1659,7 @@ bool cmCTestTestHandler::SetTestsProperties(
bool cmCTestTestHandler::AddTest(const std::vector<std::string>& args)
{
const std::string& testname = args[0];
+ cmCTestLog(this->CTest, ERROR_MESSAGE, "Add test: " << args[0] << std::endl);
if (this->UseExcludeRegExpFlag &&
this->UseExcludeRegExpFirst &&
this->ExcludeTestsRegularExpression.find(testname.c_str()))
@@ -1706,6 +1711,8 @@ bool cmCTestTestHandler::AddTest(const std::vector<std::string>& args)
test.Name = testname;
test.Args = args;
test.Directory = cmSystemTools::GetCurrentWorkingDirectory();
+ cmCTestLog(this->CTest, ERROR_MESSAGE, "Set test directory: " << test.Directory << std::endl);
+
test.IsInBasedOnREOptions = true;
test.WillFail = false;
if (this->UseIncludeRegExpFlag &&
diff --git a/Source/CTest/cmCTestUpdateCommand.cxx b/Source/CTest/cmCTestUpdateCommand.cxx
index 2c116c0..913478a 100644
--- a/Source/CTest/cmCTestUpdateCommand.cxx
+++ b/Source/CTest/cmCTestUpdateCommand.cxx
@@ -24,12 +24,14 @@ cmCTestGenericHandler* cmCTestUpdateCommand::InitializeHandler()
if ( this->Values[ct_SOURCE] )
{
this->CTest->SetCTestConfiguration("SourceDirectory",
- this->Values[ct_SOURCE]);
+ cmSystemTools::CollapseFullPath(
+ this->Values[ct_SOURCE]).c_str());
}
else
{
this->CTest->SetCTestConfiguration("SourceDirectory",
- this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY"));
+ cmSystemTools::CollapseFullPath(
+ this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY")).c_str());
}
std::string source_dir
= this->CTest->GetCTestConfiguration("SourceDirectory");
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 6ec234e..22e0c1e 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -2056,8 +2056,11 @@ void cmCTest::PopulateCustomInteger(cmMakefile* mf, const char* def, int& val)
std::string cmCTest::GetShortPathToFile(const char* cfname)
{
const std::string& sourceDir
- = this->GetCTestConfiguration("SourceDirectory");
- const std::string& buildDir = this->GetCTestConfiguration("BuildDirectory");
+ = cmSystemTools::CollapseFullPath(
+ this->GetCTestConfiguration("SourceDirectory"));
+ const std::string& buildDir
+ = cmSystemTools::CollapseFullPath(
+ this->GetCTestConfiguration("BuildDirectory"));
std::string fname = cmSystemTools::CollapseFullPath(cfname);
// Find relative paths to both directories