give visual feedback

in most tests, this is done manually
This commit is contained in:
Martin Diehl 2020-09-19 08:33:15 +02:00
parent 49c92e7c24
commit 0746a2f3a4
1 changed files with 2 additions and 1 deletions

View File

@ -117,6 +117,7 @@ def execute(cmd,
initialPath = os.getcwd()
myEnv = os.environ if env is None else env
os.chdir(wd)
print(f"executing '{cmd}' in '{wd}'")
process = subprocess.Popen(shlex.split(cmd),
stdout = subprocess.PIPE,
stderr = subprocess.PIPE,
@ -128,7 +129,7 @@ def execute(cmd,
stdout = stdout.decode('utf-8').replace('\x08','')
stderr = stderr.decode('utf-8').replace('\x08','')
if process.returncode != 0:
raise RuntimeError(f'{cmd} failed with returncode {process.returncode}')
raise RuntimeError(f"'{cmd}' failed with returncode {process.returncode}")
return stdout, stderr