Skip to content

Commit 7066c40

Browse files
nashifhenrikbrixandersen
authored andcommitted
twister: also convert platform names from the hardwaremap
Convert platform names from the hardware map to full target names. Signed-off-by: Anas Nashif <[email protected]>
1 parent e90559f commit 7066c40

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/pylib/twister/twisterlib/twister_main.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,15 @@ def main(options: argparse.Namespace, default_options: argparse.Namespace):
181181
tplan.create_build_dir_links()
182182

183183
runner = TwisterRunner(tplan.instances, tplan.testsuites, env)
184+
# FIXME: This is a workaround for the fact that the hardware map can be usng
185+
# the short name of the platform, while the testplan is using the full name.
186+
#
187+
# convert platform names coming from the hardware map to the full target
188+
# name.
189+
# this is needed to match the platform names in the testplan.
190+
for d in hwm.duts:
191+
if d.platform in tplan.platform_names:
192+
d.platform = tplan.get_platform(d.platform).name
184193
runner.duts = hwm.duts
185194
runner.run()
186195

0 commit comments

Comments
 (0)