twister: ignore unit tests/EFI images with --show-footprint
Ignore unit tests and EFI binaries when calculating footprints with --show-footprint, or we will get a build error. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
218da91211
commit
3677a10834
2 changed files with 3 additions and 1 deletions
|
@ -854,7 +854,7 @@ class ProjectBuilder(FilterBuilder):
|
|||
@staticmethod
|
||||
def calc_size(instance: TestInstance, from_buildlog: bool):
|
||||
if instance.status not in ["error", "failed", "skipped"]:
|
||||
if not instance.platform.type in ["native", "qemu"]:
|
||||
if not instance.platform.type in ["native", "qemu", "unit"]:
|
||||
generate_warning = bool(instance.platform.type == "mcu")
|
||||
size_calc = instance.calculate_sizes(from_buildlog=from_buildlog, generate_warning=generate_warning)
|
||||
instance.metrics["used_ram"] = size_calc.get_used_ram()
|
||||
|
|
|
@ -254,6 +254,8 @@ class TestInstance:
|
|||
fns = glob.glob(os.path.join(self.build_dir, "zephyr", "*.elf"))
|
||||
fns.extend(glob.glob(os.path.join(self.build_dir, "zephyr", "*.exe")))
|
||||
fns = [x for x in fns if '_pre' not in x]
|
||||
# EFI elf files
|
||||
fns = [x for x in fns if 'zefi' not in x]
|
||||
if len(fns) != 1:
|
||||
raise BuildError("Missing/multiple output ELF binary")
|
||||
return fns[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue