Skip to content

Commit

Permalink
twister: do not create overlays/run_id for filtered cases
Browse files Browse the repository at this point in the history
Avoid creating directories and files for instances that are filtered.

Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif committed Nov 30, 2024
1 parent 092e559 commit 605ff7b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/pylib/twister/twisterlib/testinstance.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def __init__(self, testsuite, platform, outdir):
source_dir_rel,
testsuite.name
)
self.run_id = self._get_run_id()
self.run_id = None
self.domains = None
# Instance need to use sysbuild if a given suite or a platform requires it
self.sysbuild = testsuite.sysbuild or platform.sysbuild
Expand All @@ -90,6 +90,9 @@ def __init__(self, testsuite, platform, outdir):
self.filters = []
self.filter_type = None

def setup_run_id(self):
self.run_id = self._get_run_id()

def record(self, recording, fname_csv="recording.csv"):
if recording:
if self.recording is None:
Expand Down
5 changes: 5 additions & 0 deletions scripts/pylib/twister/twisterlib/testplan.py
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,11 @@ def apply_filters(self, **kwargs):
self.add_instances(instance_list)

for _, case in self.instances.items():
# Do not create files for filtered instances
if case.status == TwisterStatus.FILTER:
continue
# set run_id for each unfiltered instance
case.setup_run_id()
case.create_overlay(case.platform,
self.options.enable_asan,
self.options.enable_ubsan,
Expand Down

0 comments on commit 605ff7b

Please sign in to comment.