SWDEV-404873 - Add double quotes that handles space in path for windows OS. (#371)
Change-Id: I4752072914aded5e39105913f5bd79fcaf4b499b
[ROCm/hip-tests commit: 573aefb652]
This commit is contained in:
committed by
GitHub
parent
f72821a84d
commit
fa900628f1
@@ -85,6 +85,10 @@ class SpawnProc {
|
||||
INFO("Testing that capture file does not exist already: " << tmpFileName);
|
||||
REQUIRE(!fs::exists(tmpFileName));
|
||||
}
|
||||
if (TestContext::get().isWindows()) {
|
||||
exeName = (exeName.find(" ", 0) == std::string::npos) ? exeName : ("\"" + exeName + "\"");
|
||||
tmpFileName = (tmpFileName.find(" ", 0) == std::string::npos) ? tmpFileName : ("\"" + tmpFileName + "\"");
|
||||
}
|
||||
}
|
||||
|
||||
int run(std::string commandLineArgs = "") {
|
||||
@@ -100,6 +104,9 @@ class SpawnProc {
|
||||
execCmd += " > ";
|
||||
execCmd += tmpFileName;
|
||||
}
|
||||
if (TestContext::get().isWindows()) {
|
||||
execCmd = (execCmd.find(" ", 0) == std::string::npos) ? execCmd : ("\"" + execCmd + "\"");
|
||||
}
|
||||
auto res = std::system(execCmd.c_str());
|
||||
|
||||
if (captureOutput) {
|
||||
|
||||
Reference in New Issue
Block a user