mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 19:51:35 +01:00
test-gdb: can now run in either userland or baremetal modes
Selection with --mode userland (default because has x86_64) or --mode baremetal. This is the first userland tool where this choice is done on the command line, which led to a refactor of supported_archs and is_baremetal and is_userland into a single self.env['mode'].
This commit is contained in:
@@ -11,8 +11,9 @@ import thread_pool
|
||||
class Main(common.TestCliFunction):
|
||||
def __init__(self):
|
||||
super().__init__(
|
||||
is_baremetal=True,
|
||||
supported_archs=common.consts['crosstool_ng_supported_archs'],
|
||||
defaults={
|
||||
'mode': 'baremetal'
|
||||
},
|
||||
)
|
||||
self.add_argument(
|
||||
'tests',
|
||||
@@ -49,7 +50,7 @@ If given, run only the given tests. Otherwise, run all tests.
|
||||
if os.path.splitext(in_filename)[1] in self.env['baremetal_build_in_exts']:
|
||||
path_relative_root = os.path.join(dirpath_relative_root, in_filename)
|
||||
my_path_properties = path_properties.get(path_relative_root)
|
||||
if my_path_properties.should_be_tested(self.env, is_baremetal=True):
|
||||
if my_path_properties.should_be_tested(self.env):
|
||||
cur_run_args = run_args.copy()
|
||||
cur_run_args.update({
|
||||
'baremetal': os.path.relpath(os.path.join(path_abs, in_filename), os.getcwd()),
|
||||
|
||||
Reference in New Issue
Block a user