From a2ce4101734af88a77df70a19d09132d4aedc683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Wed, 3 Jun 2020 03:00:02 +0000 Subject: [PATCH] fix test running after multi userland args change for gem5 --- common.py | 5 +++-- test-executables | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common.py b/common.py index 50dd19d..f9f3bb0 100644 --- a/common.py +++ b/common.py @@ -435,6 +435,7 @@ See: https://cirosantilli.com/linux-kernel-module-cheat#initrd self.add_argument( '-b', '--baremetal', + action='append', help='''\ Use the given baremetal executable instead of the Linux kernel. @@ -1161,8 +1162,8 @@ Incompatible archs are skipped. env['qcow2_file'] = env['buildroot_qcow2_file'] # Image - if env['baremetal'] is not None: - env['image'] = self.resolve_baremetal_executable(env['baremetal']) + if env['baremetal']: + env['image'] = self.resolve_baremetal_executable(env['baremetal'][0]) source_path_noext = os.path.splitext(join( env['root_dir'], env['image'][len(env['baremetal_build_dir']) + 1:] diff --git a/test-executables b/test-executables index 7b5c3a5..cd3be11 100755 --- a/test-executables +++ b/test-executables @@ -63,10 +63,10 @@ If given, run only the given tests. Otherwise, run all tests. if my_path_properties.should_be_tested(self.env): cur_run_args = run_args.copy() cur_run_args.update({ - self.env['mode']: os.path.relpath( + self.env['mode']: [os.path.relpath( os.path.join(path_abs, in_filename), os.getcwd() - ), + )], }) cur_run_args.update(my_path_properties['test_run_args']) if my_path_properties['test_stdin_data'] is not None: