commit 9fc53cfa7b9b5bf761ef37344fc7c7c53bb07d51
parent 76d54b28eab88214d8172d1cf53b8eb16db449e5
Author: James Prestwood <prestwoj@gmail.com>
Date: Wed, 22 Dec 2021 17:12:21 -0800
test-runner: catch exception on test file removal
Without catching this can result in a fatal error, ending the
test run.
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git 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'), \