Browse Source

twister: build_dir: convert / to _ to support hwmv2

Convert platform name in the build_dir variable to use _ instead of /.
Otherwise we will be creating deep hierachy of directories based on the
new platform name containing slashes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
pull/69687/head
Anas Nashif 1 year ago committed by Jamie McCrae
parent
commit
bcf4ad19d4
  1. 5
      scripts/pylib/twister/twisterlib/testinstance.py

5
scripts/pylib/twister/twisterlib/testinstance.py

@ -56,12 +56,13 @@ class TestInstance: @@ -56,12 +56,13 @@ class TestInstance:
self.name = os.path.join(platform.name, testsuite.name)
self.dut = None
clean_platform_name = platform.name.replace("/", "_")
if testsuite.detailed_test_id:
self.build_dir = os.path.join(outdir, platform.name, testsuite.name)
self.build_dir = os.path.join(outdir, clean_platform_name, testsuite.name)
else:
# if suite is not in zephyr, keep only the part after ".." in reconstructed dir structure
source_dir_rel = testsuite.source_dir_rel.rsplit(os.pardir+os.path.sep, 1)[-1]
self.build_dir = os.path.join(outdir, platform.name, source_dir_rel, testsuite.name)
self.build_dir = os.path.join(outdir, clean_platform_name, source_dir_rel, testsuite.name)
self.run_id = self._get_run_id()
self.domains = None

Loading…
Cancel
Save