test-runner: clean up temporary files
PATCH 1/3 test-runner: clean up temporary files
--- tools/test-runner | 6 ++++++ 1 file changed, 6 insertions(+)
tools/test-runner +6 -0
@@ -497,6 +497,8 @@ class Namespace: print("Killing process %s" % p.name) self.stop_process(p) + os.remove(self.dbus_address.split('=')[0]) + def __del__(self): print("Removing namespace %s" % self.name) self.reset()
@@ -1168,6 +1170,10 @@ def run_auto_tests(ctx, args): finally: post_test(ctx, copied) + shutil.rmtree('/tmp/certs') + shutil.rmtree('/tmp/secrets') + os.remove('/tmp/phonesim.conf') + # Write out kernel log if ctx.args.log: Process(["dmesg"], ctx=ctx, wait=True)
Signature · 1 line
2.26.2
PATCH 2/3 test-runner: add monitor to path
--- tools/test-runner | 1 + 1 file changed, 1 insertion(+)
tools/test-runner +1 -0
@@ -1230,6 +1230,7 @@ def run_tests(): os.environ['PATH'] = '%s/src' % args.testhome os.environ['PATH'] += ':%s/tools' % args.testhome os.environ['PATH'] += ':%s/client' % args.testhome + os.environ['PATH'] += ':%s/monitor' % args.testhome os.environ['PATH'] += ':%s/wired' % args.testhome os.environ['PATH'] += ':' + args.path
Signature · 1 line
2.26.2
PATCH 3/3 test-runner: print error if kernel/qemu path is not found
In reply to James Prestwood--- tools/test-runner | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
tools/test-runner +10 -2
@@ -1264,11 +1264,13 @@ class Main: self.parser.add_argument('--qemu', '-q', metavar='<QEMU binary>', type=str, help='QEMU binary to use', - dest='qemu') + dest='qemu', + default=None) self.parser.add_argument('--kernel', '-k', metavar='<kernel>', type=str, help='Path to kernel image', - dest='kernel') + dest='kernel', + default=None) self.parser.add_argument('--verbose', '-v', metavar='<list>', type=str, help='Comma separated list of applications',
@@ -1350,6 +1352,9 @@ class Main: if self.args.qemu is None: qemu_binary = find_binary(qemu_table) + if not qemu_binary: + print("Could not find qemu binary") + quit() else: if path_exists(self.args.qemu): qemu_binary = self.args.qemu
@@ -1360,6 +1365,9 @@ class Main: if self.args.kernel is None: kernel_binary = find_binary(kernel_table) + if not kernel_binary: + print("Could not find kernel image") + quit() else: if path_exists(self.args.kernel): kernel_binary = self.args.kernel
Signature · 1 line
2.26.2
Hi James,
Quoted 4 lines · James Prestwood
--- tools/test-runner | 6 ++++++ 1 file changed, 6 insertions(+)
All applied, thanks.
Regards,
-Denis