ENH: make tes test finding logic also try full paths as relative paths because some folks have been doing that and 2.4 handled it
This commit is contained in:
parent
da273b1026
commit
5020a1f4a0
@ -1165,7 +1165,7 @@ std::string cmCTestTestHandler::FindTheExecutable(const char *exe)
|
|||||||
failedPaths);
|
failedPaths);
|
||||||
}
|
}
|
||||||
|
|
||||||
// add additional configuraitons to the search path
|
// add additional configurations to the search path
|
||||||
void cmCTestTestHandler
|
void cmCTestTestHandler
|
||||||
::AddConfigurations(cmCTest *ctest,
|
::AddConfigurations(cmCTest *ctest,
|
||||||
std::vector<std::string> &attempted,
|
std::vector<std::string> &attempted,
|
||||||
@ -1175,7 +1175,8 @@ void cmCTestTestHandler
|
|||||||
{
|
{
|
||||||
std::string tempPath;
|
std::string tempPath;
|
||||||
|
|
||||||
if (filepath.size())
|
if (filepath.size() &&
|
||||||
|
filepath[filepath.size()-1] != '/')
|
||||||
{
|
{
|
||||||
filepath += "/";
|
filepath += "/";
|
||||||
}
|
}
|
||||||
@ -1259,6 +1260,16 @@ std::string cmCTestTestHandler
|
|||||||
attemptedConfigs,
|
attemptedConfigs,
|
||||||
filepath,filename);
|
filepath,filename);
|
||||||
|
|
||||||
|
// even if a fullpath was specified also try it relative to the current directory
|
||||||
|
if (filepath.size() && filepath[0] == '/')
|
||||||
|
{
|
||||||
|
std::string localfilepath = filepath.substr(1,filepath.size()-1);
|
||||||
|
cmCTestTestHandler::AddConfigurations(ctest, attempted,
|
||||||
|
attemptedConfigs,
|
||||||
|
localfilepath,filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// if extraPaths are provided and we were not passed a full path, try them,
|
// if extraPaths are provided and we were not passed a full path, try them,
|
||||||
// try any extra paths
|
// try any extra paths
|
||||||
if (filepath.size() == 0)
|
if (filepath.size() == 0)
|
||||||
@ -1274,8 +1285,8 @@ std::string cmCTestTestHandler
|
|||||||
filepathExtra,
|
filepathExtra,
|
||||||
filenameExtra);
|
filenameExtra);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// store the final location in fullPath
|
// store the final location in fullPath
|
||||||
std::string fullPath;
|
std::string fullPath;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user