From 8925c172431cd994c8da0eb4cc562fe03a1cb610 Mon Sep 17 00:00:00 2001
From: Holger Levsen
Date: Thu, 12 Jan 2017 17:03:57 +0100
Subject: reproducible Debian: refactor
Signed-off-by: Holger Levsen
---
bin/reproducible_html_breakages.py | 14 ++++++++------
1 file 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 += '
\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 += '
'
+ png_file = 'stats_breakages.png'
+ main_label = "source packages causing Diffoscope to timeout and crash"
+ create_breakages_graph(png_file, main_label)
+ html += '
'
# link artifacts
html += '
Artifacts diffoscope crashed on are available for 48h for download.'
--
cgit v1.2.3-70-g09d2