test-runner: catch exception on test file removal

Without catching this can result in a fatal error, ending the
test run.
This commit is contained in:
James Prestwood 2021-12-22 17:12:21 -08:00 committed by Denis Kenzior
parent 76d54b28ea
commit 9fc53cfa7b
1 changed files with 4 additions and 1 deletions

View File

@ -1380,7 +1380,10 @@ def post_test(ctx, to_copy):
allowed = ['phonesim.conf', 'certs', 'secrets', 'iwd']
for f in [f for f in os.listdir('/tmp') if f not in allowed]:
dbg("File %s was not cleaned up!" % f)
os.remove('/tmp/' + f)
try:
os.remove('/tmp/' + f)
except:
pass
def print_results(results):
table = PrettyTable(['Test', colored('Passed', 'green'), colored('Failed', 'red'), \