summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValerie R Young <spectranaut@riseup.net>2016-03-31 21:33:42 -0400
committerHolger Levsen <holger@layer-acht.org>2016-03-31 23:38:34 -0400
commit36feec984328edc2ecf54efd06932e97535b86e8 (patch)
tree1ed1fc82fd1353f95e0d12be12dac923b9a4ef73
parent357dd57dad4523b8b2a58a1c84977f77e3926c48 (diff)
downloadjenkins.debian.net-36feec984328edc2ecf54efd06932e97535b86e8.tar.xz
reproducible debian: updated reproducible-tracker.json
-rwxr-xr-xbin/reproducible_json.py39
1 files changed, 37 insertions, 2 deletions
diff --git a/bin/reproducible_json.py b/bin/reproducible_json.py
index 0200ded5..5cf7be38 100755
--- a/bin/reproducible_json.py
+++ b/bin/reproducible_json.py
@@ -16,7 +16,6 @@ import json
import os
import tempfile
-
output = []
output4tracker = []
@@ -32,13 +31,49 @@ result = sorted(query_db(query))
log.info('\tprocessing ' + str(len(result)))
keys = ['package', 'version', 'suite', 'architecture', 'status', 'build_date']
+crossarchkeys = ['package', 'version', 'suite', 'status']
+archdetailkeys = ['architecture', 'status', 'build_date']
+
+# crossarch is a dictionary of all packages used to build a summary of the package's test results
+# across all archs (for suite=unstable only)
+crossarch = {}
for row in result:
pkg = dict(zip(keys, row))
log.debug(pkg)
output.append(pkg)
+
# tracker.d.o should only care about results in unstable
if pkg['suite'] == 'unstable':
- output4tracker.append(pkg)
+
+ package = pkg['package']
+ if package in crossarch:
+
+ # compare statuses to get cross-arch package status
+ status1 = crossarch[package]['status']
+ status2 = pkg['status']
+ newstatus = ''
+
+ if 'FTBFS' in [status1, status2]:
+ newstatus = 'FTBFS'
+ elif 'unreproducible' in [status1, status2]:
+ newstatus = 'unreproducible'
+ elif 'reproducible' in [status1, status2]:
+ newstatus = 'reproducible'
+ else:
+ newstatus = 'depwait'
+
+ # update the crossarch status
+ crossarch[package]['status'] = newstatus
+
+ # add arch specific test results to architecture_details list
+ crossarch[package]['architecture_details'].append({key:pkg[key] for key in archdetailkeys})
+
+ else:
+ # add package to crossarch
+ crossarch[package] = {key:pkg[key] for key in crossarchkeys}
+ crossarch[package]['architecture_details'] = [{key:pkg[key] for key in archdetailkeys}]
+
+output4tracker = list(crossarch.values())
# normal json
tmpfile = tempfile.mkstemp(dir=os.path.dirname(REPRODUCIBLE_JSON))[1]