summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-03-03 13:05:08 +0100
committerHolger Levsen <holger@layer-acht.org>2015-03-03 13:05:08 +0100
commitbc2d2c794d9f12595f824033ef0184a9c7ad26e3 (patch)
treee1d8fc77207ce52f4d640174a2479706ffdc5a7e /bin
parenta3750a958cf1a0d20178e6e0e55c6f350b4df665 (diff)
downloadjenkins.debian.net-bc2d2c794d9f12595f824033ef0184a9c7ad26e3.tar.xz
reproducible: fix stats for suites != sid
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_common.sh11
-rwxr-xr-xbin/reproducible_html_graphs.sh1
2 files changed, 6 insertions, 6 deletions
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index 1f90ca05..d592213d 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -271,13 +271,12 @@ gather_schedule_stats() {
COUNT_NEW_VERSIONS=$(sqlite3 -init $INIT $PACKAGES_DB "$QUERY")
}
-# we only care about sid here
gather_stats() {
- COUNT_BAD=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='sid' AND r.status = \"unreproducible\"")
- COUNT_UGLY=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='sid' AND r.status = \"FTBFS\"")
- COUNT_SOURCELESS=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='sid' AND r.status = \"404\"")
- COUNT_NOTFORUS=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='sid' AND r.status = \"not for us\"")
- COUNT_BLACKLISTED=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='sid' AND r.status = \"blacklisted\"")
+ COUNT_BAD=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND r.status = \"unreproducible\"")
+ COUNT_UGLY=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND r.status = \"FTBFS\"")
+ COUNT_SOURCELESS=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND r.status = \"404\"")
+ COUNT_NOTFORUS=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND r.status = \"not for us\"")
+ COUNT_BLACKLISTED=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(s.name) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite='$SUITE' AND r.status = \"blacklisted\"")
PERCENT_BAD=$(echo "scale=1 ; ($COUNT_BAD*100/$COUNT_TOTAL)" | bc)
PERCENT_UGLY=$(echo "scale=1 ; ($COUNT_UGLY*100/$COUNT_TOTAL)" | bc)
PERCENT_NOTFORUS=$(echo "scale=1 ; ($COUNT_NOTFORUS*100/$COUNT_TOTAL)" | bc)
diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh
index 65e6a3c1..7aa76de8 100755
--- a/bin/reproducible_html_graphs.sh
+++ b/bin/reproducible_html_graphs.sh
@@ -260,6 +260,7 @@ write_usertag_table() {
}
VIEW=suite_stats
+gather_stats # FIXME: this script should be run in a loop (and rewritten)
PAGE=index_${VIEW}.html
echo "$(date) - starting to write $PAGE page."
write_page_header $VIEW "Overview of various statistics about reproducible builds for $SUITE"