[Commit slider] Tune shell settings for linux (#17884)

This commit is contained in:
Yury Gaydaychuk
2023-06-13 11:54:45 +04:00
committed by GitHub
parent 78303aecba
commit b25c8ef860
3 changed files with 20 additions and 3 deletions
@@ -42,7 +42,7 @@
},
"dlbConfig" : {
"launchedAsJob" : false,
"toolName" : "{e2e|mo} - specified outside tool, supposed to be downloaded by job",
"toolName" : "{e2e|ac} - specified outside tool, supposed to be downloaded by job",
"appPath" : "path, substituted by job"
}
}
@@ -105,6 +105,20 @@ def absolutizePaths(cfg):
prepFile = cfg["runConfig"]["preprocess"]["file"]
prepFile = os.path.abspath(prepFile)
cfg["runConfig"]["preprocommArgcess"]["file"] = prepFile
if "envVars" in cfg:
updatedEnvVars = []
for env in cfg["envVars"]:
envKey = env["name"]
envVal = env["val"]
# format ov-path in envvars for e2e case
if "{gitPath}" in envVal:
envVal = envVal.format(gitPath=cfg["gitPath"])
envVal = os.path.abspath(envVal)
updatedVar = {"name": envKey, "val": envVal}
updatedEnvVars.append(updatedVar)
else:
updatedEnvVars.append(env)
cfg["envVars"] = updatedEnvVars
return cfg
@@ -214,13 +228,16 @@ def fetchAppOutput(cfg, commit):
commitLogger.info("Run command: {command}".format(
command=appCmd)
)
shellFlag = True
if cfg["os"] == "linux":
shellFlag = False
p = subprocess.Popen(
appCmd.split(),
cwd=appPath,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
env=newEnv,
shell=True
shell=shellFlag
)
output, err = p.communicate()
output = output.decode("utf-8")
@@ -187,7 +187,7 @@ class CompareBlobsMode(Mode):
commitLogger = getCommitLogger(cfg, rightCommit)
commitLogger.info(
"Commit {status} from {c}".format(
status=("differs" if isDiff else "doesn't differ"),
status=("differs" if isDiff else "don't differ"),
c=list[i2])
)
if isDiff: