summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_html_live_status.py
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-09-18 13:24:41 +0200
committerHolger Levsen <holger@layer-acht.org>2015-09-18 13:24:41 +0200
commitf8aeea1c546391f54878fb305c65d35e17055569 (patch)
tree091a9308afb061ab915a786c41fb4e10f800011f /bin/reproducible_html_live_status.py
parent835be242a08abcb7a0a81b804f3214dc35315bf4 (diff)
downloadjenkins.debian.net-f8aeea1c546391f54878fb305c65d35e17055569.tar.xz
reproducible: show previous status and build duration in schedule
Diffstat (limited to 'bin/reproducible_html_live_status.py')
-rwxr-xr-xbin/reproducible_html_live_status.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/reproducible_html_live_status.py b/bin/reproducible_html_live_status.py
index b60de0f4..fb5ed691 100755
--- a/bin/reproducible_html_live_status.py
+++ b/bin/reproducible_html_live_status.py
@@ -32,7 +32,8 @@ def generate_schedule(arch):
log.info('Building the schedule index page for ' + arch + '...')
title = 'Packages currently scheduled on ' + arch + ' for testing for build reproducibility'
query = 'SELECT sch.date_scheduled, s.suite, s.architecture, s.name ' + \
- 'FROM schedule AS sch JOIN sources AS s ON sch.package_id=s.id ' + \
+ 'r.status, r.build_duration' + \
+ 'FROM schedule AS sch JOIN sources AS s ON sch.package_id=s.id LEFT JOIN results AS r ON s.id=r.package_id ' + \
'WHERE sch.date_build_started = "" AND s.architecture="{arch}" ORDER BY sch.date_scheduled'
text = Template('$tot packages are currently scheduled for testing on $arch:')
html = ''
@@ -44,12 +45,13 @@ def generate_schedule(arch):
html += '<th>arch</th><th>source package</th></tr>\n'
bugs = get_bugs()
for row in rows:
- # 0: date_scheduled, 1: suite, 2: arch, 3: pkg name
+ # 0: date_scheduled, 1: suite, 2: arch, 3: pkg name 4: previous status 5: previous build duration
pkg = row[3]
+ duration = convert_into_hms_string(row[5])
html += tab + '<tr><td>&nbsp;</td><td>' + row[0] + '</td>'
html += '<td>' + row[1] + '</td><td>' + row[2] + '</td><td><code>'
html += link_package(pkg, row[1], row[2], bugs)
- html += '</code></td></tr>\n'
+ html += '</code></td><td>'+str(row[4])+'</td><td>'+duration+'</td></tr>\n'
html += '</table></p>\n'
destfile = BASE + '/index_' + arch + '_scheduled.html'
desturl = REPRODUCIBLE_URL + '/index_' + arch + '_scheduled.html'