mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 03:31: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:
@@ -114,8 +114,6 @@ class PathProperties:
|
||||
self,
|
||||
env,
|
||||
link=False,
|
||||
is_baremetal=False,
|
||||
is_userland=False,
|
||||
):
|
||||
if len(self.path_components) > 1 and \
|
||||
self.path_components[1] == 'libs' and \
|
||||
@@ -129,23 +127,21 @@ class PathProperties:
|
||||
env['arch'] in self['allowed_archs']
|
||||
) and \
|
||||
(
|
||||
(is_userland and self['userland'] ) or
|
||||
(is_baremetal and self['baremetal'])
|
||||
(env['mode'] == 'userland' and self['userland'] ) or
|
||||
(env['mode'] == 'baremetal' and self['baremetal'])
|
||||
) and \
|
||||
not (
|
||||
link and
|
||||
self['no_executable']
|
||||
)
|
||||
|
||||
def should_be_tested(self, env, is_baremetal=False, is_userland=False):
|
||||
def should_be_tested(self, env):
|
||||
return (
|
||||
self.should_be_built(
|
||||
env,
|
||||
is_baremetal=is_baremetal,
|
||||
is_userland=is_userland
|
||||
) and
|
||||
not (
|
||||
is_baremetal and (
|
||||
env['mode'] == 'baremetal' and (
|
||||
self['arm_aarch32'] or
|
||||
self['signal_generated_by_os']
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user