twister: do not create overlays/run_id for filtered cases
Avoid creating directories and files for instances that are filtered. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
f8c6570584
commit
440659878d
3 changed files with 10 additions and 2 deletions
|
@ -79,7 +79,7 @@ class TestInstance:
|
||||||
source_dir_rel,
|
source_dir_rel,
|
||||||
testsuite.name
|
testsuite.name
|
||||||
)
|
)
|
||||||
self.run_id = self._get_run_id()
|
self.run_id = None
|
||||||
self.domains = None
|
self.domains = None
|
||||||
# Instance need to use sysbuild if a given suite or a platform requires it
|
# Instance need to use sysbuild if a given suite or a platform requires it
|
||||||
self.sysbuild = testsuite.sysbuild or platform.sysbuild
|
self.sysbuild = testsuite.sysbuild or platform.sysbuild
|
||||||
|
@ -90,6 +90,9 @@ class TestInstance:
|
||||||
self.filters = []
|
self.filters = []
|
||||||
self.filter_type = None
|
self.filter_type = None
|
||||||
|
|
||||||
|
def setup_run_id(self):
|
||||||
|
self.run_id = self._get_run_id()
|
||||||
|
|
||||||
def record(self, recording, fname_csv="recording.csv"):
|
def record(self, recording, fname_csv="recording.csv"):
|
||||||
if recording:
|
if recording:
|
||||||
if self.recording is None:
|
if self.recording is None:
|
||||||
|
|
|
@ -1206,6 +1206,11 @@ class TestPlan:
|
||||||
self.add_instances(instance_list)
|
self.add_instances(instance_list)
|
||||||
|
|
||||||
for _, case in self.instances.items():
|
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,
|
case.create_overlay(case.platform,
|
||||||
self.options.enable_asan,
|
self.options.enable_asan,
|
||||||
self.options.enable_ubsan,
|
self.options.enable_ubsan,
|
||||||
|
|
|
@ -174,7 +174,7 @@ class TestReport:
|
||||||
pytest.fail(f"Unsupported file type: '{path}'")
|
pytest.fail(f"Unsupported file type: '{path}'")
|
||||||
|
|
||||||
for f_platform in test_platforms:
|
for f_platform in test_platforms:
|
||||||
platform_path = os.path.join(out_path, f_platform.replace("/", "_"))
|
platform_path = os.path.join(out_path, f_platform.replace("/", "_") + ".json", )
|
||||||
assert os.path.exists(platform_path), f'file not found {f_platform}'
|
assert os.path.exists(platform_path), f'file not found {f_platform}'
|
||||||
|
|
||||||
assert str(sys_exit.value) == '0'
|
assert str(sys_exit.value) == '0'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue