twister: also convert platform names from the hardwaremap

Convert platform names from the hardware map to full target names.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2024-10-24 11:10:36 -04:00 committed by Henrik Brix Andersen
parent e90559f0da
commit 7066c40afc
1 changed files with 9 additions and 0 deletions

View File

@ -181,6 +181,15 @@ def main(options: argparse.Namespace, default_options: argparse.Namespace):
tplan.create_build_dir_links() tplan.create_build_dir_links()
runner = TwisterRunner(tplan.instances, tplan.testsuites, env) 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.duts = hwm.duts
runner.run() runner.run()