From 7066c40afc00e2cf34d8648c0079817e235e4d0a Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Thu, 24 Oct 2024 11:10:36 -0400 Subject: [PATCH] twister: also convert platform names from the hardwaremap Convert platform names from the hardware map to full target names. Signed-off-by: Anas Nashif --- scripts/pylib/twister/twisterlib/twister_main.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/pylib/twister/twisterlib/twister_main.py b/scripts/pylib/twister/twisterlib/twister_main.py index f5ee03b808a..310cdc7bfdd 100644 --- a/scripts/pylib/twister/twisterlib/twister_main.py +++ b/scripts/pylib/twister/twisterlib/twister_main.py @@ -181,6 +181,15 @@ def main(options: argparse.Namespace, default_options: argparse.Namespace): tplan.create_build_dir_links() runner = TwisterRunner(tplan.instances, tplan.testsuites, env) + # FIXME: This is a workaround for the fact that the hardware map can be usng + # the short name of the platform, while the testplan is using the full name. + # + # convert platform names coming from the hardware map to the full target + # name. + # this is needed to match the platform names in the testplan. + for d in hwm.duts: + if d.platform in tplan.platform_names: + d.platform = tplan.get_platform(d.platform).name runner.duts = hwm.duts runner.run()