Skip to content

Commit 632d006

Browse files
gchwierkartben
authored andcommitted
twister: Convert platform names before printing
Just move a code with workaroud to convert platform names to the full name with variants. It fixes an issue, that not every platforms are printed before running tests. Signed-off-by: Grzegorz Chwierut <[email protected]>
1 parent 5052919 commit 632d006

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

scripts/pylib/twister/twisterlib/twister_main.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,16 @@ def twister(options: argparse.Namespace, default_options: argparse.Namespace):
135135
report.synopsis()
136136
return 0
137137

138+
# FIXME: This is a workaround for the fact that the hardware map can be usng
139+
# the short name of the platform, while the testplan is using the full name.
140+
#
141+
# convert platform names coming from the hardware map to the full target
142+
# name.
143+
# this is needed to match the platform names in the testplan.
144+
for d in hwm.duts:
145+
if d.platform in tplan.platform_names:
146+
d.platform = tplan.get_platform(d.platform).name
147+
138148
if options.device_testing and not options.build_only:
139149
print("\nDevice testing on:")
140150
hwm.dump(filtered=tplan.selected_platforms)
@@ -149,15 +159,6 @@ def twister(options: argparse.Namespace, default_options: argparse.Namespace):
149159
tplan.create_build_dir_links()
150160

151161
runner = TwisterRunner(tplan.instances, tplan.testsuites, env)
152-
# FIXME: This is a workaround for the fact that the hardware map can be usng
153-
# the short name of the platform, while the testplan is using the full name.
154-
#
155-
# convert platform names coming from the hardware map to the full target
156-
# name.
157-
# this is needed to match the platform names in the testplan.
158-
for d in hwm.duts:
159-
if d.platform in tplan.platform_names:
160-
d.platform = tplan.get_platform(d.platform).name
161162
runner.duts = hwm.duts
162163
runner.run()
163164

0 commit comments

Comments
 (0)