summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2017-01-12 17:03:57 +0100
committerHolger Levsen <holger@layer-acht.org>2017-01-12 17:03:57 +0100
commit8925c172431cd994c8da0eb4cc562fe03a1cb610 (patch)
tree66524cfa5729cc66da721b5fe1f2a88a551436d8 /bin
parente6457deea88eba78e2e946eee7b73f441ab9da04 (diff)
downloadjenkins.debian.net-8925c172431cd994c8da0eb4cc562fe03a1cb610.tar.xz
reproducible Debian: refactor
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_html_breakages.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/bin/reproducible_html_breakages.py b/bin/reproducible_html_breakages.py
index 69c4dafe..71181d5e 100755
--- a/bin/reproducible_html_breakages.py
+++ b/bin/reproducible_html_breakages.py
@@ -287,8 +287,8 @@ def _gen_files_html(header, entries):
html += '</pre></p>\n'
return html
-def create_breakages_graph():
- png_file = os.path.join(DEBIAN_BASE, 'stats_breakages.png')
+def create_breakages_graph(png_file, main_label):
+ png_fullpath = os.path.join(DEBIAN_BASE, png_file)
table = "stats_breakages"
columns = ["datum", "diffoscope_timeouts", "diffoscope_crashes"]
query = "SELECT {fields} FROM {table} ORDER BY datum".format(
@@ -304,10 +304,9 @@ def create_breakages_graph():
f.flush()
graph_command = os.path.join(BIN_PATH, "make_graph.py")
- main_label = "source packages causing Diffoscope to timeout and crash"
y_label = "Amount (packages)"
log.info("Creating graph for stats_breakges.")
- check_call([graph_command, csv_tmp_file, png_file, '2', main_label,
+ check_call([graph_command, csv_tmp_file, png_fullpath, '2', main_label,
y_label, '1920', '960'])
@@ -372,8 +371,11 @@ def gen_html():
html += str(count_pkgs(without_dbd)) + ').'
# gather stats and add graph
update_stats_breakages(count_pkgs(bad_dbd), count_pkgs(without_dbd))
- create_breakages_graph
- html += '<br> <a href="/debian/stats_breakages.png"><img src="/debian/stats_breakages.png" alt="source packages causing Diffoscope to timeout and crash"></a>'
+ png_file = 'stats_breakages.png'
+ main_label = "source packages causing Diffoscope to timeout and crash"
+ create_breakages_graph(png_file, main_label)
+ html += '<br> <a href="/debian/' + png_file + '"><img src="/debian/'
+ html += png_file + '" alt="' + main_label + '"></a>'
# link artifacts
html += '<br/> <a href="https://tests.reproducible-builds.org/debian/artifacts/">Artifacts diffoscope crashed</a> on are available for 48h for download.'