mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
test-runner: clear log dir before new log test run
The log dir was never being cleaned out prior to a new logging test run. This could leave old stale files around. Note that this will remove any past log files so if you need them, you want to make a copy before running test-runner with --log again.
This commit is contained in:
parent
a0865c9010
commit
c2d71fdaa5
@ -1249,6 +1249,14 @@ def run_tests():
|
|||||||
|
|
||||||
if args.log:
|
if args.log:
|
||||||
mount('logdir', args.log, '9p', 0, 'trans=virtio,version=9p2000.L')
|
mount('logdir', args.log, '9p', 0, 'trans=virtio,version=9p2000.L')
|
||||||
|
# Clear out any log files from other test runs
|
||||||
|
for f in glob('%s/*' % args.log):
|
||||||
|
print("removing %s" % f)
|
||||||
|
|
||||||
|
if os.path.isdir(f):
|
||||||
|
shutil.rmtree(f)
|
||||||
|
else:
|
||||||
|
os.remove(f)
|
||||||
elif args.monitor:
|
elif args.monitor:
|
||||||
parent = os.path.abspath(os.path.join(args.monitor, os.pardir))
|
parent = os.path.abspath(os.path.join(args.monitor, os.pardir))
|
||||||
mount('mondir', parent, '9p', 0, 'trans=virtio,version=9p2000.L')
|
mount('mondir', parent, '9p', 0, 'trans=virtio,version=9p2000.L')
|
||||||
|
Loading…
Reference in New Issue
Block a user