[Tests] Fixed problems when a test using git failed

- We didn't restore the working dir
This commit is contained in:
Salvador E. Tropea 2022-08-25 13:38:57 -03:00
parent 5bf773a070
commit d0caf5b8fd
1 changed files with 3 additions and 2 deletions

View File

@ -341,10 +341,11 @@ class TestContext(object):
if e.stdout:
logging.debug('- Output from command: '+e.stdout.decode())
raise
finally:
if chdir_out:
os.chdir(cwd)
if res.stdout:
logging.debug('- Output from command: '+res.stdout.decode())
if chdir_out:
os.chdir(cwd)
return res.stdout.decode().rstrip()
def run(self, ret_val=None, extra=None, use_a_tty=False, filename=None, no_out_dir=False, no_board_file=False,