aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerge Broslavsky <serge.broslavsky@linaro.org>2020-10-28 18:33:53 +0200
committerSerge Broslavsky <serge.broslavsky@linaro.org>2020-10-28 18:33:53 +0200
commit8451430be1921aefed74c58f6eaa02fb81e911d0 (patch)
tree96cc4a83fab2454ce18cc847dc73d4359d4beea5
parent37337f941f41d1cf4793712ad225e6eb7548db52 (diff)
downloadlkft-bucket-8451430be1921aefed74c58f6eaa02fb81e911d0.tar.gz
WIP: report generation
-rw-r--r--stable_report.py16
-rw-r--r--templates/project-stats.jinja143
-rw-r--r--templates/stable-build-report.jinja148
3 files changed, 156 insertions, 151 deletions
diff --git a/stable_report.py b/stable_report.py
index 226dbdc..9809e33 100644
--- a/stable_report.py
+++ b/stable_report.py
@@ -919,15 +919,15 @@ def debug(group):
environments = {}
suites = {}
- build = project.build("v5.8.14-126-g63a345a56136")
- print("\nBuild:")
- dump_object(build)
- prev_build = project.build("v5.8.14-125-gf4ed6fb8f168")
- compared_to_prev = Project.compare_builds(prev_build.id, build.id)
-
- base_build = project.build("v5.8.13-86-g8bb413de12d0")
- compared_to_base = Project.compare_builds(base_build.id, build.id)
+ builds = list(project.builds().values())
+ new_build = builds[0]
+ #breakpoint()
+ for baseline_build in builds[1:]:
+ print("\n{0} -- {1}".format(baseline_build.version, new_build.version))
+ bc = Project.compare_builds(baseline_build.id, new_build.id)
+ print(json.dumps(bc, sort_keys=True, indent=2))
+ #new_build = baseline_build
def other():
diff --git a/templates/project-stats.jinja b/templates/project-stats.jinja
deleted file mode 100644
index d45faee..0000000
--- a/templates/project-stats.jinja
+++ /dev/null
@@ -1,143 +0,0 @@
-## Kernel
-* kernel: {{ build.metadata.make_kernelversion }}
-* git repo: {{ build.metadata.git_repo }}
-* git branch: {{ build.metadata.git_branch }}
-* git commit: {{ build.metadata.git_commit }}
-* git describe: {{ build.version }}
-* Test details: {{ build_details_url }}
-
-## Compared to previous build: {{ prev_build.version }}
-
-### Summary
-Regressions: {% if compared_to_prev.regressions|length == 0 %}none{% else %}{% len(compared_to_prev.regressions) %}{% endif %}
-Fixes: {% if compared_to_prev.fixes|length == 0 %}none{% else %}{% len(compared_to_prev.fixes) %}{% endif %}
-
-### Regressions
-{% if compared_to_prev.regressions|length == 0 %}
-
-No regressions found.
-{% else %}
-{% for e in compared_to_prev.regressions %}
-
-{{ e }}:
-{% for s in compared_to_prev.regressions[e] %}
- {{ s }}:
-{% for r in compared_to_prev.regressions[e][s] %}
- * {{ r }}
-{% endfor %}
-{% endfor %}
-{% endfor %}
-{%endif %}
-
-### Fixes
-{% if compared_to_prev.fixes|length == 0 %}
-
-No fixes found.
-{% else %}
-{% for e in compared_to_prev.fixes %}
-
-{{ e }}:
-{% for s in compared_to_prev.fixes[e] %}
- {{ s }}:
-{% for f in compared_to_prev.fixes[e][s] %}
- * {{ f }}
-{% endfor %}
-{% endfor %}
-{% endfor %}
-{% endif %}
-
-## Compared to base build: {{ prev_build.version }}
-
-### Summary
-Regressions: {% if compared_to_base.regressions|length == 0 %}none{% else %}{% len(compared_to_base.regressions) %}{% endif %}
-Fixes: {% if compared_to_base.fixes|length == 0 %}none{% else %}{% len(compared_to_base.fixes) %}{% endif %}
-
-### Regressions
-{% if compared_to_base.regressions|length == 0 %}
-
-No regressions found.
-{% else %}
-{% for e in compared_to_base.regressions %}
-
-{{ e }}:
-{% for s in compared_to_base.regressions[e] %}
- {{ s }}:
-{% for r in compared_to_base.regressions[e][s] %}
- * {{ r }}
-{% endfor %}
-{% endfor %}
-{% endfor %}
-{%endif %}
-
-### Fixes
-{% if fixes|length == 0 %}
-
-No fixes found.
-{% else %}
-{% for e in fixes %}
-
-{{ e }}:
-{% for s in fixes[e] %}
- {{ s }}:
-{% for f in fixes[e][s] %}
- * {{ f }}
-{% endfor %}
-{% endfor %}
-{% endfor %}
-{% endif %}
-
-
-
-## Summary
-{% for e in environments %}
-{% for s in suites %}
-{% set total = summary[e.slug][s.slug].pass + summary[e.slug][s.slug].fail + summary[e.slug][s.slug].skip + summary[e.slug][s.slug].xfail %}
-{% if total == 0 %}{% continue %}{% endif %}
-### {{ e.slug }}, {{ s.slug }}
-* total: {{ total }}
-* pass: {{ summary[e.slug][s.slug].pass }}
-* fail: {{ summary[e.slug][s.slug].fail }}
-* skip: {{ summary[e.slug][s.slug].skip }}
-* xfail: {{ summary[e.slug][s.slug].xfail }}
-{% endfor %}
-{% endfor %}
-
-## Environments
-{% for e in environments %}
-* {{ e.slug }}
-{% endfor %}
-
-## Suites
-{% for s in suites %}
-* {{ s.slug }}
-{% endfor %}
-
-## Failures
-{% for e in results %}
-{% for s in results[e] %}
-{% if results[e][s]|count == 0%}{% continue %}{% endif %}
-### {{ e }}, {{ s }}
-{% for t in results[e][s] %}
-{% if t.status == 'fail' %}
-* {{ t.short_name }}
-{% endif %}
-{% endfor %}
-{% endfor %}
-{% endfor %}
-
-## Skips
-{% for e in results %}
-{% for s in results[e] %}
-{% if results[e][s]|count == 0%}{% continue %}{% endif %}
-### {{ e }}, {{ s }}
-{% for t in results[e][s] %}
-{% if t.status == 'skip' %}
-* {{ t.short_name }}
-{% endif %}
-{% endfor %}
-{% endfor %}
-{% endfor %}
-
---
-Linaro LKFT
-https://lkft.linaro.org
diff --git a/templates/stable-build-report.jinja b/templates/stable-build-report.jinja
new file mode 100644
index 0000000..5a68357
--- /dev/null
+++ b/templates/stable-build-report.jinja
@@ -0,0 +1,148 @@
+## Kernel
+* kernel: {{ build.metadata.make_kernelversion }}
+* git repo: {{ build.metadata.git_repo }}
+* git branch: {{ build.metadata.git_branch }}
+* git commit: {{ build.metadata.git_commit }}
+* git describe: {{ build.version }}
+* Test details: {{ build_details_url }}
+
+{% if prev_build %}
+## Compared to previous build: {{ prev_build.version }}
+
+### Summary
+Regressions: {% if compared_to_prev.regressions|length == 0 %}none{% else %}{% len(compared_to_prev.regressions) %}{% endif %}
+Fixes: {% if compared_to_prev.fixes|length == 0 %}none{% else %}{% len(compared_to_prev.fixes) %}{% endif %}
+
+### Regressions
+{% if compared_to_prev.regressions|length == 0 %}
+
+No regressions found.
+{% else %}
+{% for environment in compared_to_prev.regressions %}
+
+{{ environment }}:
+{% for suite in compared_to_prev.regressions[environment] %}
+ {{ suite }}:
+{% for test in compared_to_prev.regressions[environment][suite] %}
+ * {{ test }}
+{% endfor %}
+{% endfor %}
+{% endfor %}
+{%endif %}
+
+### Fixes
+{% if compared_to_prev.fixes|length == 0 %}
+
+No fixes found.
+{% else %}
+{% for e in compared_to_prev.fixes %}
+
+{{ environment }}:
+{% for suite in compared_to_prev.regressions[environment] %}
+ {{ suite }}:
+{% for test in compared_to_prev.regressions[environment][suite] %}
+ * {{ test }}
+{% endfor %}
+{% endfor %}
+{% endfor %}
+{% endif %}
+{% endif %}
+
+{% if prev_build %}
+## Compared to base build: {{ prev_build.version }}
+
+### Summary
+Regressions: {% if compared_to_base.regressions|length == 0 %}none{% else %}{% len(compared_to_base.regressions) %}{% endif %}
+Fixes: {% if compared_to_base.fixes|length == 0 %}none{% else %}{% len(compared_to_base.fixes) %}{% endif %}
+
+### Regressions
+{% if compared_to_base.regressions|length == 0 %}
+
+No regressions found.
+{% else %}
+{% for e in compared_to_base.regressions %}
+
+{{ environment }}:
+{% for suite in compared_to_prev.regressions[environment] %}
+ {{ suite }}:
+{% for test in compared_to_prev.regressions[environment][suite] %}
+ * {{ test }}
+{% endfor %}
+{% endfor %}
+{% endfor %}
+{%endif %}
+
+### Fixes
+{% if fixes|length == 0 %}
+
+No fixes found.
+{% else %}
+{% for e in fixes %}
+
+{{ environment }}:
+{% for suite in compared_to_prev.regressions[environment] %}
+ {{ suite }}:
+{% for test in compared_to_prev.regressions[environment][suite] %}
+ * {{ test }}
+{% endfor %}
+{% endfor %}
+{% endfor %}
+{% endif %}
+
+
+## Build Summary for {{ build.version }}
+{% for environment in environments %}
+{% for suite in suites %}
+{% set total = summary[environment.slug][suite.slug].pass
+ + summary[environment.slug][suite.slug].fail
+ + summary[environment.slug][suite.slug].skip
+ + summary[environment.slug][suite.slug].xfail %}
+{% if total == 0 %}{% continue %}{% endif %}
+### {{ e.slug }}, {{ s.slug }}
+* total: {{ total }}
+* pass: {{ summary[environment.slug][suie.slug].pass }}
+* fail: {{ summary[environment.slug][suie.slug].fail }}
+* skip: {{ summary[environment.slug][suie.slug].skip }}
+* xfail: {{ summary[environment.slug][suie.slug].xfail }}
+{% endfor %}
+{% endfor %}
+
+## Environments
+{% for environment in environments %}
+* {{ environment.slug }}
+{% endfor %}
+
+## Suites
+{% for suite in suites %}
+* {{ suite.slug }}
+{% endfor %}
+
+## Failures
+{% for environment in results %}
+{% for ssuite in results[e] %}
+{% if results[environment][suite]|count == 0%}{% continue %}{% endif %}
+### {{ environment }}, {{ suite }}
+{% for test in results[environment][suite] %}
+{% if test.status == 'fail' %}
+* {{ test.short_name }}
+{% endif %}
+{% endfor %}
+{% endfor %}
+{% endfor %}
+
+## Skips
+{% for environment in results %}
+{% for suite in results[e] %}
+{% if results[environment][suite]|count == 0%}{% continue %}{% endif %}
+### {{ environment }}, {{ suite }}
+{% for test in results[environment][suite] %}
+{% if test.status == 'skip' %}
+* {{ test.short_name }}
+{% endif %}
+{% endfor %}
+{% endfor %}
+{% endfor %}
+
+--
+Linaro LKFT
+https://lkft.linaro.org