From 9fc53cfa7b9b5bf761ef37344fc7c7c53bb07d51 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 22 Dec 2021 17:12:21 -0800 Subject: [PATCH] test-runner: catch exception on test file removal Without catching this can result in a fatal error, ending the test run. --- tools/test-runner | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/test-runner b/tools/test-runner index 7fa8b840..b5c4f777 100755 --- a/tools/test-runner +++ b/tools/test-runner @@ -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'), \