mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-14 02:18:42 -05:00
Merge topic 'ctest-regression' into release-4.0
712cb8cb14ctest: Restore support for -T Test without dashboard configuratione47dc29967cmCTestStartCommand: Remove unnecessary codef54699d31dcmCTest: De-duplicate working directory code Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !10432
This commit is contained in:
@@ -139,7 +139,6 @@ bool cmCTestStartCommand::InitialPass(std::vector<std::string> const& args,
|
||||
return false;
|
||||
}
|
||||
|
||||
this->CTest->SetSuppressUpdatingCTestConfiguration(true);
|
||||
int model;
|
||||
if (smodel) {
|
||||
model = cmCTest::GetTestModelFromString(smodel);
|
||||
@@ -183,7 +182,6 @@ bool cmCTestStartCommand::InitialPass(std::vector<std::string> const& args,
|
||||
&mf, "BuildName", "CTEST_BUILD_NAME", quiet);
|
||||
|
||||
this->CTest->Initialize(bld_dir);
|
||||
this->CTest->UpdateCTestConfiguration();
|
||||
|
||||
cmCTestOptionalLog(
|
||||
this->CTest, OUTPUT,
|
||||
|
||||
+15
-38
@@ -173,8 +173,6 @@ struct cmCTest::Private
|
||||
bool CompressXMLFiles = false;
|
||||
bool CompressTestOutput = true;
|
||||
|
||||
bool SuppressUpdatingCTestConfiguration = false;
|
||||
|
||||
bool Debug = false;
|
||||
bool Quiet = false;
|
||||
|
||||
@@ -529,9 +527,6 @@ bool cmCTest::ReadExistingTag(bool quiet)
|
||||
|
||||
bool cmCTest::UpdateCTestConfiguration()
|
||||
{
|
||||
if (this->Impl->SuppressUpdatingCTestConfiguration) {
|
||||
return true;
|
||||
}
|
||||
std::string fileName = this->Impl->BinaryDir + "/CTestConfiguration.ini";
|
||||
if (!cmSystemTools::FileExists(fileName)) {
|
||||
fileName = this->Impl->BinaryDir + "/DartConfiguration.tcl";
|
||||
@@ -716,20 +711,9 @@ int cmCTest::ProcessSteps()
|
||||
this->Impl->Verbose = true;
|
||||
this->Impl->ProduceXML = true;
|
||||
|
||||
std::string const currDir = cmSystemTools::GetLogicalWorkingDirectory();
|
||||
std::string workDir = currDir;
|
||||
if (!this->Impl->TestDir.empty()) {
|
||||
workDir = cmSystemTools::ToNormalizedPathOnDisk(this->Impl->TestDir);
|
||||
}
|
||||
// Minimal dashboard client script configuration.
|
||||
this->SetCTestConfiguration("BuildDirectory", this->Impl->BinaryDir);
|
||||
|
||||
cmWorkingDirectory changeDir(workDir);
|
||||
if (changeDir.Failed()) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, changeDir.GetError() << std::endl);
|
||||
return 1;
|
||||
}
|
||||
|
||||
this->Impl->BinaryDir = workDir;
|
||||
cmSystemTools::ConvertToUnixSlashes(this->Impl->BinaryDir);
|
||||
this->UpdateCTestConfiguration();
|
||||
this->BlockTestErrorDiagnostics();
|
||||
|
||||
@@ -2648,6 +2632,19 @@ int cmCTest::Run(std::vector<std::string> const& args)
|
||||
return this->RunScripts(runScripts);
|
||||
}
|
||||
|
||||
// Establish the working directory.
|
||||
std::string const currDir = cmSystemTools::GetLogicalWorkingDirectory();
|
||||
std::string workDir = currDir;
|
||||
if (!this->Impl->TestDir.empty()) {
|
||||
workDir = cmSystemTools::ToNormalizedPathOnDisk(this->Impl->TestDir);
|
||||
}
|
||||
cmWorkingDirectory changeDir(workDir);
|
||||
if (changeDir.Failed()) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, changeDir.GetError() << std::endl);
|
||||
return 1;
|
||||
}
|
||||
this->Impl->BinaryDir = workDir;
|
||||
|
||||
// -D, -T, and/or -M was specified
|
||||
if (processSteps) {
|
||||
return this->ProcessSteps();
|
||||
@@ -2682,18 +2679,6 @@ int cmCTest::ExecuteTests(std::vector<std::string> const& args)
|
||||
this->Impl->ExtraVerbose = this->Impl->Verbose;
|
||||
this->Impl->Verbose = true;
|
||||
|
||||
std::string const currDir = cmSystemTools::GetLogicalWorkingDirectory();
|
||||
std::string workDir = currDir;
|
||||
if (!this->Impl->TestDir.empty()) {
|
||||
workDir = cmSystemTools::ToNormalizedPathOnDisk(this->Impl->TestDir);
|
||||
}
|
||||
|
||||
cmWorkingDirectory changeDir(workDir);
|
||||
if (changeDir.Failed()) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, changeDir.GetError() << std::endl);
|
||||
return 1;
|
||||
}
|
||||
|
||||
cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
|
||||
if (!this->Impl->InteractiveDebugMode) {
|
||||
this->BlockTestErrorDiagnostics();
|
||||
@@ -2701,9 +2686,6 @@ int cmCTest::ExecuteTests(std::vector<std::string> const& args)
|
||||
cmSystemTools::PutEnv("CTEST_INTERACTIVE_DEBUG_MODE=1");
|
||||
}
|
||||
|
||||
this->Impl->BinaryDir = workDir;
|
||||
cmSystemTools::ConvertToUnixSlashes(this->Impl->BinaryDir);
|
||||
|
||||
this->UpdateCTestConfiguration();
|
||||
|
||||
cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl);
|
||||
@@ -3187,11 +3169,6 @@ void cmCTest::ClearSubmitFiles(Part part)
|
||||
this->Impl->Parts[part].SubmitFiles.clear();
|
||||
}
|
||||
|
||||
void cmCTest::SetSuppressUpdatingCTestConfiguration(bool val)
|
||||
{
|
||||
this->Impl->SuppressUpdatingCTestConfiguration = val;
|
||||
}
|
||||
|
||||
void cmCTest::AddCTestConfigurationOverwrite(std::string const& overStr)
|
||||
{
|
||||
size_t epos = overStr.find('=');
|
||||
|
||||
@@ -298,12 +298,6 @@ public:
|
||||
/** Decode a URL to the original string. */
|
||||
static std::string DecodeURL(std::string const&);
|
||||
|
||||
/**
|
||||
* Should ctect configuration be updated. When using new style ctest
|
||||
* script, this should be true.
|
||||
*/
|
||||
void SetSuppressUpdatingCTestConfiguration(bool val);
|
||||
|
||||
/**
|
||||
* Add overwrite to ctest configuration.
|
||||
*
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
32
|
||||
@@ -1,3 +1,3 @@
|
||||
Cannot find file: [^
|
||||
]*/Tests/RunCMake/CTestCommandLine/EmptyDirCoverage-ctest-build/DartConfiguration.tcl
|
||||
CTEST_BINARY_DIRECTORY not set
|
||||
Cannot find any coverage files\. Ignoring Coverage request\.$
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
Cannot find file: [^
|
||||
]*/Tests/RunCMake/CTestCommandLine/EmptyDirTest-ctest-build/DartConfiguration.tcl
|
||||
No tests were found!!!$
|
||||
@@ -554,6 +554,10 @@ set(ENV{CMAKE_TLS_VERIFY} 0) # Test fallback to env variable.
|
||||
run_FailDrop(TLSVerify-OFF-env)
|
||||
unset(ENV{CMAKE_TLS_VERIFY})
|
||||
|
||||
run_cmake_command(EmptyDirTest-ctest
|
||||
${CMAKE_CTEST_COMMAND} -C Debug -M Experimental -T Test
|
||||
)
|
||||
|
||||
run_cmake_command(EmptyDirCoverage-ctest
|
||||
${CMAKE_CTEST_COMMAND} -C Debug -M Experimental -T Coverage
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user