mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-27 04:09:36 +03:00
ctest: Introduce CTestDirectory
Introduce a new internal testProperty object called CTestDirectory. This directory is originally set to the directory were the test was created, but will not be overwritten when the WORKING_DIRECTORY property is updated on the test.
This commit is contained in:
@@ -2493,7 +2493,8 @@ bool cmCTestTestHandler::AddTest(std::vector<std::string> const& args)
|
||||
cmCTestTestProperties test;
|
||||
test.Name = testname;
|
||||
test.Args = args;
|
||||
test.Directory = cmSystemTools::GetLogicalWorkingDirectory();
|
||||
test.CTestDirectory = cmSystemTools::GetLogicalWorkingDirectory();
|
||||
test.Directory = test.CTestDirectory;
|
||||
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||
"Set test directory: " << test.Directory << std::endl,
|
||||
this->Quiet);
|
||||
|
||||
@@ -131,7 +131,10 @@ public:
|
||||
void AppendError(cm::string_view err);
|
||||
cm::optional<std::string> Error;
|
||||
std::string Name;
|
||||
// working directory for test, overridden by WORKING_DIRECTORY property
|
||||
std::string Directory;
|
||||
// Original directory of test creation
|
||||
std::string CTestDirectory;
|
||||
std::vector<std::string> Args;
|
||||
std::vector<std::string> RequiredFiles;
|
||||
std::vector<std::string> Depends;
|
||||
|
||||
Reference in New Issue
Block a user