Leverage PathToAtomicsFolder in Python framework (#675)

Parsing the command to replace PathToAtomicsFolder variable.
Can-t use environment variables as some Powershell based tests use "$PathToAtomicsFolder".
I admit that it-s a bit hackish but I think it-s the most straightforward way to handle this without going through a major refactor of this framework
This commit is contained in:
Fabricio Brunetti
2019-11-19 19:20:59 -03:00
committed by Carrie Roberts
parent 24ff7c7173
commit a49e529a34
@@ -394,6 +394,11 @@ def execute_command(launcher, command, cwd):
# We skip empty lines. This is due to the split just above.
if comm == "":
continue
# Replace instances of PathToAtomicsFolder
atomics = os.path.join(cwd,"..")
comm = comm.replace("$PathToAtomicsFolder", atomics)
comm = comm.replace("PathToAtomicsFolder", atomics)
# # We actually run the command itself.
p = subprocess.Popen(launcher, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE,