mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-07-16 03:47:19 +00:00
scripts/machine-summary: write per-machine reports with more details
Rename the updates.html format to just 'report'. This report has the existing overview as the index.html, and then per-machine files are written with the patch breakdown. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
@@ -167,7 +167,26 @@ class TextOverview(Format):
|
||||
name = "overview.txt"
|
||||
|
||||
class HtmlUpdates(Format):
|
||||
name = "updates.html"
|
||||
name = "report"
|
||||
|
||||
def render(self, context, output: pathlib.Path):
|
||||
if output.exists() and not output.is_dir():
|
||||
print(f"{output} is not a directory", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
if not output.exists():
|
||||
output.mkdir(parents=True)
|
||||
|
||||
with open(output / "index.html", "wt") as f:
|
||||
f.write(self.get_template(f"report-index.html.jinja").render(context))
|
||||
|
||||
subcontext = context.copy()
|
||||
del subcontext["data"]
|
||||
for machine, subdata in context["data"].items():
|
||||
subcontext["machine"] = machine
|
||||
subcontext["data"] = subdata
|
||||
with open(output / f"{machine}.html", "wt") as f:
|
||||
f.write(self.get_template(f"report-details.html.jinja").render(subcontext))
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="machine-summary")
|
||||
|
||||
Reference in New Issue
Block a user