Lines Matching +full:platform +full:- +full:schema
4 # Copyright (c) 2018-2024 Intel Corporation
7 # SPDX-License-Identifier: Apache-2.0
28 print("Install the anytree module to use the --test-tree option")
34 from twisterlib.platform import Platform
50 "python-devicetree", "src"))
51 from devicetree import edtlib # pylint: disable=unused-import
56 # platform keys
57 PLATFORM_KEY = 'platform key filter'
64 # filters related to platform definition
65 PLATFORM = 'Platform related filter' variable in Filters
74 # in case of missing env. variable required for a platform
86 config_re = re.compile('(CONFIG_[A-Za-z0-9_]+)[=]\"?([^\"]*)\"?$')
87 dt_re = re.compile('([A-Za-z0-9_]+)[=]\"?([^\"]*)\"?$')
91 "scripts", "schemas", "twister", "testsuite-schema.yaml"))
94 "scripts", "schemas", "twister", "quarantine-schema.yaml"))
101 "test-config-schema.yaml"
186 print(f" - {test}")
221 # validate quarantine yaml file against the provided schema
239 self.selected_platforms = set(p.platform.name for p in self.instances.values())
242 self.selected_platforms = set(p.platform.name for p in self.instances.values())
245 # If the platform does not exist in the hardware map or was not specified by --platform,
250 for _cp in self.options.platform:
263 self.selected_platforms = set(p.platform.name for p in self.instances.values())
288 # the execution order is: "plat1-testA, plat1-testB, ...,
289 # plat1-testZ, plat2-testA, ...". For hardware tests
292 # "plat1-testA, plat2-testA, ..., plat1-testB, plat2-testB, ..."
317 num_extra_sets = total - (per_set * sets)
323 start = (subset - 1) * (per_set + 1)
327 start = ((subset - num_extra_sets - 1) * per_set) + base
335 # add all pre-filtered tests that are skipped or got error status
350 logger.info("Test tree is always shown with detailed test-id.")
355 logger.info("Test list is always shown with detailed test-id.")
369 msg += (f"- {dupe} found in:\n")
371 msg += (f" - {dc.yamlfile}\n")
382 print(f"- {t}")
429 print(f" - {test}")
459 platform = Platform()
464 platform.load(board, target, aliases, data)
465 platform.qualifier = qualifier
466 if platform.name in [p.name for p in self.platforms]:
467 logger.error(f"Duplicate platform {platform.name} in {board.dir}")
468 raise Exception(f"Duplicate platform identifier {platform.name} found")
469 if not platform.twister:
471 self.platforms.append(platform)
482 scp = TwisterConfigParser(file, Platform.platform_schema)
493 scp = TwisterConfigParser(board.dir / 'twister.yaml', Platform.platform_schema)
531 for platform in self.platforms:
533 if platform.default:
534 self.default_platforms.append(platform.name)
535 #logger.debug(f"adding {platform.name} to default platforms")
538 if pp in platform.aliases:
539 logger.debug(f"adding {platform.name} to default platforms (override mode)")
540 self.default_platforms.append(platform.name)
651 logger.debug(f"Skip - {msg}")
670 for platform in self.platforms:
671 if name in platform.aliases:
672 selected_platform = platform
676 def handle_quarantined_tests(self, instance: TestInstance, plat: Platform): argument
702 platform = self.get_platform(ts["platform"])
703 if filter_platform and platform.name not in filter_platform:
705 instance = TestInstance(self.testsuites[testsuite], platform, self.env.outdir)
734 # test marked as built only can run when --test-only is used.
743 self.handle_quarantined_tests(instance, platform)
763 instance.create_overlay(platform,
775 def check_platform(self, platform, platform_list): argument
776 return any(p in platform.aliases for p in platform_list)
781 platform_filter = self.options.platform
796 logger.debug("platform filter: " + str(platform_filter))
808 # When --all used, any --platform arguments ignored
821 logger.debug(f"Checking platform filter: {platform_filter}")
901 instance.add_filter("Platform is excluded on command line.", Filters.CMD_LINE)
976 instance.add_filter("In testsuite platform exclude", Filters.TESTSUITE)
982 instance.add_filter("Command line platform filter", Filters.CMD_LINE)
987 instance.add_filter("Not in testsuite platform allow list", Filters.TESTSUITE)
990 instance.add_filter("Not in testsuite platform type list", Filters.TESTSUITE)
1007 Filters.PLATFORM
1011 instance.add_filter("Not enough RAM", Filters.PLATFORM)
1017 "No robot support for the selected platform",
1024 instance.add_filter("No hardware support", Filters.PLATFORM)
1027 instance.add_filter("Not enough FLASH", Filters.PLATFORM)
1031 "Excluded tags per platform (exclude_tags)",
1032 Filters.PLATFORM
1036 instance.add_filter("Excluded tags per platform (only_tags)", Filters.PLATFORM)
1064 # snippet applies to all boards and further platform-specific checks
1071 match = re.search(this_board[1:-1], plat.name)
1080 instance.add_filter("Snippet not supported", Filters.PLATFORM)
1086 # platform_key is a list of unique platform attributes that form a unique key
1088 # A key containing a field name that the platform does not have
1089 # will filter the platform.
1092 # to run a test once per unique (arch, simulation) platform.
1103 "Excluded platform missing key fields"
1105 Filters.PLATFORM
1122 f" by platform {keyed_test['plat'].name} having key {plat_key}",
1126 # do not add a platform to keyed tests if previously
1140 # if twister was launched with no platform options at all, we
1150 lambda _scenario: _scenario.platform.name in _intersection,
1162 filter(lambda ts: ts.platform.name in _platforms, instance_list)
1168 lambda item: item.platform.name in ts.integration_platforms,
1178 lambda inst: not inst.platform.simulator_by_name(self.options.sim_name),
1182 instance.add_filter("Not an emulated platform", Filters.CMD_LINE)
1187 lambda inst: inst.platform.vendor not in vendor_filter,
1191 instance.add_filter("Not a selected vendor platform", Filters.CMD_LINE)
1201 case.create_overlay(case.platform,
1207 self.selected_platforms = set(p.platform.name for p in self.instances.values())
1239 Verify if platform name (passed by --platform option, or in yaml file
1240 as platform_allow or integration_platforms options) is correct. If not -
1244 for platform in platform_names_to_verify:
1245 if platform in self.platform_names:
1246 p = self.get_platform(platform)
1250 logger.error(f"{log_info} - unrecognized platform - {platform}")
1256 Iterate through all no-skipped instances in suite and create links
1273 path and link them with original path - create link. At the end
1299 if instance.platform.name in instance.testsuite.integration_platforms:
1310 f"Changing status of {instance.name} to ERROR because it is an integration platform"