[Qa-jenkins-scm] [jenkins.debian.net] 02/02: reproducible Debian: refactor

Holger Levsen holger at layer-acht.org
Thu Jan 12 16:04:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 8925c172431cd994c8da0eb4cc562fe03a1cb610
Author: Holger Levsen <holger at layer-acht.org>
Date:   Thu Jan 12 17:03:57 2017 +0100

    reproducible Debian: refactor
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 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 69c4daf..71181d5 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.'
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list