sanitycheck: support --force-platform
This option allows running tests on platforms that would be excluded based on the test definition. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
60ae507783
commit
1a5defa924
2 changed files with 22 additions and 11 deletions
|
@ -2539,6 +2539,7 @@ class TestSuite(DisablePyTestCollectionMixin):
|
|||
all_filter = kwargs.get('all')
|
||||
device_testing_filter = kwargs.get('device_testing')
|
||||
force_toolchain = kwargs.get('force_toolchain')
|
||||
force_platform = kwargs.get('force_platform')
|
||||
|
||||
logger.debug("platform filter: " + str(platform_filter))
|
||||
logger.debug(" arch_filter: " + str(arch_filter))
|
||||
|
@ -2573,7 +2574,7 @@ class TestSuite(DisablePyTestCollectionMixin):
|
|||
self.device_testing,
|
||||
self.fixture
|
||||
)
|
||||
if plat.name in exclude_platform:
|
||||
if not force_platform and plat.name in exclude_platform:
|
||||
discards[instance] = "Platform is excluded on command line."
|
||||
continue
|
||||
|
||||
|
@ -2608,17 +2609,19 @@ class TestSuite(DisablePyTestCollectionMixin):
|
|||
discards[instance] = "Command line testcase arch filter"
|
||||
continue
|
||||
|
||||
if tc.arch_whitelist and plat.arch not in tc.arch_whitelist:
|
||||
discards[instance] = "Not in test case arch whitelist"
|
||||
continue
|
||||
if not force_platform:
|
||||
|
||||
if tc.arch_exclude and plat.arch in tc.arch_exclude:
|
||||
discards[instance] = "In test case arch exclude"
|
||||
continue
|
||||
if tc.arch_whitelist and plat.arch not in tc.arch_whitelist:
|
||||
discards[instance] = "Not in test case arch whitelist"
|
||||
continue
|
||||
|
||||
if tc.platform_exclude and plat.name in tc.platform_exclude:
|
||||
discards[instance] = "In test case platform exclude"
|
||||
continue
|
||||
if tc.arch_exclude and plat.arch in tc.arch_exclude:
|
||||
discards[instance] = "In test case arch exclude"
|
||||
continue
|
||||
|
||||
if tc.platform_exclude and plat.name in tc.platform_exclude:
|
||||
discards[instance] = "In test case platform exclude"
|
||||
continue
|
||||
|
||||
if tc.toolchain_exclude and toolchain in tc.toolchain_exclude:
|
||||
discards[instance] = "In test case toolchain exclude"
|
||||
|
|
|
@ -519,6 +519,13 @@ structure in the main Zephyr tree: boards/<arch>/<board_name>/""")
|
|||
"-S", "--enable-slow", action="store_true",
|
||||
help="Execute time-consuming test cases that have been marked "
|
||||
"as 'slow' in testcase.yaml. Normally these are only built.")
|
||||
|
||||
parser.add_argument(
|
||||
"-K", "--force-platform", action="store_true",
|
||||
help="""Force testing on selected platforms,
|
||||
even if they are excluded in the test configuration"""
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--disable-unrecognized-section-test", action="store_true",
|
||||
default=False,
|
||||
|
@ -933,7 +940,8 @@ def main():
|
|||
force_toolchain=options.force_toolchain,
|
||||
all=options.all,
|
||||
run_individual_tests=run_individual_tests,
|
||||
device_testing=options.device_testing
|
||||
device_testing=options.device_testing,
|
||||
force_platform=options.force_platform
|
||||
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue