mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 03:01:36 +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:
@@ -17,7 +17,9 @@ TODO: expose all userland relevant ./run args here as well somehow.
|
||||
'''
|
||||
if not 'defaults' in kwargs:
|
||||
kwargs['defaults'] = {}
|
||||
super().__init__(*args, is_userland=True, **kwargs)
|
||||
if not 'mode' in kwargs['defaults']:
|
||||
kwargs['defaults']['mode'] = 'userland'
|
||||
super().__init__(*args, **kwargs)
|
||||
self.add_argument(
|
||||
'tests',
|
||||
nargs='*',
|
||||
@@ -53,7 +55,7 @@ If given, run only the given tests. Otherwise, run all tests.
|
||||
if os.path.splitext(in_filename)[1] in self.env['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_userland=True):
|
||||
if my_path_properties.should_be_tested(self.env):
|
||||
cur_run_args = run_args.copy()
|
||||
cur_run_args.update({
|
||||
'userland': os.path.relpath(os.path.join(path_abs, in_filename), os.getcwd()),
|
||||
|
||||
Reference in New Issue
Block a user