Skip to content

Commit d52212b

Browse files
committed
actions: fix filtering for clang action
Do not invoke --integration when dealing with one platform only and generate testplan only for the needed platforms. Signed-off-by: Anas Nashif <[email protected]>
1 parent 26856ca commit d52212b

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

scripts/ci/test_plan.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ def process(self):
9696
self.find_tags()
9797
self.find_excludes()
9898
self.find_tests()
99-
self.find_archs()
99+
if not self.platforms:
100+
self.find_archs()
100101
self.find_boards()
101102

102103
def get_plan(self, options, integration=False):
@@ -105,6 +106,7 @@ def get_plan(self, options, integration=False):
105106
if integration:
106107
cmd.append("--integration")
107108

109+
logging.info(" ".join(cmd))
108110
_ = subprocess.call(cmd)
109111
with open(fname, newline='') as csvfile:
110112
csv_reader = csv.reader(csvfile, delimiter=',')
@@ -138,7 +140,13 @@ def find_archs(self):
138140

139141
if _options:
140142
logging.info(f'Potential architecture filters...')
141-
self.get_plan(_options, True)
143+
if self.platforms:
144+
for platform in self.platforms:
145+
_options.extend(["-p", platform])
146+
147+
self.get_plan(_options, True)
148+
else:
149+
self.get_plan(_options, False)
142150

143151
def find_boards(self):
144152
boards = set()
@@ -255,8 +263,11 @@ def find_excludes(self):
255263
for platform in self.platforms:
256264
_options.extend(["-p", platform])
257265

258-
_options.extend(self.tag_options)
259-
self.get_plan(_options, True)
266+
_options.extend(self.tag_options)
267+
self.get_plan(_options)
268+
else:
269+
_options.extend(self.tag_options)
270+
self.get_plan(_options, True)
260271
else:
261272
logging.info(f'No twister needed or partial twister run only...')
262273

0 commit comments

Comments
 (0)