mirror of
https://git.yoctoproject.org/meta-zephyr
synced 2026-05-02 21:32:11 +02:00
Mostly stolen from meta-arm Signed-off-by: Jon Mason <jon.mason@arm.com> Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
27 lines
635 B
Python
Executable File
27 lines
635 B
Python
Executable File
#! /usr/bin/env python3
|
|
|
|
from pathlib import Path
|
|
import sys
|
|
|
|
metazephyr = Path.cwd()
|
|
|
|
if metazephyr.name != "meta-zephyr":
|
|
print("Not running inside meta-zephyr")
|
|
sys.exit(1)
|
|
|
|
# All machine configurations
|
|
machines = metazephyr.glob("meta-zephyr-bsp/conf/machine/*.conf")
|
|
machines = set(p.stem for p in machines)
|
|
|
|
# All kas files
|
|
kas = metazephyr.glob("ci/*.yml")
|
|
kas = set(p.stem for p in kas)
|
|
|
|
missing = machines - kas
|
|
print(f"The following machines are missing: {', '.join(sorted(missing))}.")
|
|
|
|
covered = len(machines) - len(missing)
|
|
total = len(machines)
|
|
percent = int(covered / total * 100)
|
|
print(f"Coverage: {percent}%")
|