mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 14:49:24 +01:00
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:
parent
76d54b28ea
commit
9fc53cfa7b
@ -1380,7 +1380,10 @@ def post_test(ctx, to_copy):
|
|||||||
allowed = ['phonesim.conf', 'certs', 'secrets', 'iwd']
|
allowed = ['phonesim.conf', 'certs', 'secrets', 'iwd']
|
||||||
for f in [f for f in os.listdir('/tmp') if f not in allowed]:
|
for f in [f for f in os.listdir('/tmp') if f not in allowed]:
|
||||||
dbg("File %s was not cleaned up!" % f)
|
dbg("File %s was not cleaned up!" % f)
|
||||||
|
try:
|
||||||
os.remove('/tmp/' + f)
|
os.remove('/tmp/' + f)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
def print_results(results):
|
def print_results(results):
|
||||||
table = PrettyTable(['Test', colored('Passed', 'green'), colored('Failed', 'red'), \
|
table = PrettyTable(['Test', colored('Passed', 'green'), colored('Failed', 'red'), \
|
||||||
|
Loading…
Reference in New Issue
Block a user