twister: platform filtering when test-only
Add the functionality to use -p and -P to filter out platforms when using test-only Signed-off-by: Pavlo Havrylyuk <pavlo.havrylyuk@infineon.com>
This commit is contained in:
parent
8219c7ccda
commit
8f37003401
1 changed files with 7 additions and 2 deletions
|
@ -216,11 +216,16 @@ class TestPlan:
|
|||
# in cases where no platform was specified when running the tests.
|
||||
# If the platform does not exist in the hardware map, just skip it.
|
||||
connected_list = []
|
||||
if not self.options.platform:
|
||||
if self.options.platform:
|
||||
connected_list = self.options.platform
|
||||
else:
|
||||
for connected in self.hwm.duts:
|
||||
if connected['connected']:
|
||||
connected_list.append(connected['platform'])
|
||||
|
||||
if self.options.exclude_platform:
|
||||
for excluded in self.options.exclude_platform:
|
||||
if excluded in connected_list:
|
||||
connected_list.remove(excluded)
|
||||
self.load_from_file(last_run, filter_platform=connected_list)
|
||||
self.selected_platforms = set(p.platform.name for p in self.instances.values())
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue