From 310f28365f4dd6a247390e812c689642025aeea6 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 28 Sep 2014 01:14:19 +0200 Subject: reproducible: new job, displaying statistics --- bin/reproducible_stats.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 bin/reproducible_stats.sh (limited to 'bin/reproducible_stats.sh') diff --git a/bin/reproducible_stats.sh b/bin/reproducible_stats.sh new file mode 100755 index 00000000..51c233be --- /dev/null +++ b/bin/reproducible_stats.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Copyright 2014 Holger Levsen +# released under the GPLv=2 + +set +x +PACKAGES_DB=/var/lib/jenkins/reproducible.db +if [ ! -f $PACKAGES_DB ] ; then + echo "$PACKAGES_DB doesn't exist, no stats possible." + exit 1 +fi + +GOOD=$(sqlite3 $PACKAGES_DB "SELECT name FROM source_packages WHERE status = \"reproducible\" ORDER BY name" | xargs echo) +COUNT_GOOD=$(sqlite3 $PACKAGES_DB "SELECT COUNT(name) FROM source_packages WHERE status = \"reproducible\"") +BAD=$(sqlite3 $PACKAGES_DB "SELECT name FROM source_packages WHERE status = \"unreproducible\" ORDER BY name" | xargs echo) +COUNT_BAD=$(sqlite3 $PACKAGES_DB "SELECT COUNT(name) FROM source_packages WHERE status = \"unreproducible\"") +UGLY=$(sqlite3 $PACKAGES_DB "SELECT name FROM source_packages WHERE status = \"FTBFS\" ORDER BY name" | xargs echo) +COUNT_UGLY=$(sqlite3 $PACKAGES_DB "SELECT COUNT(name) FROM source_packages WHERE status = \"FTBFS\"") +SOURCELESS=$(sqlite3 $PACKAGES_DB "SELECT name FROM source_packages WHERE status = \"404\" ORDER BY name" | xargs echo) +COUNT_SOURCELESS=$(sqlite3 $PACKAGES_DB "SELECT COUNT(name) FROM source_packages WHERE status = \"404\"" | xargs echo) +COUNT_TOTAL=$(sqlite3 $PACKAGES_DB "SELECT COUNT(name) FROM source_packages") + +echo +echo "Simple statistics for reproducible builds as tested on jenkins.debian.net so far" +echo +echo "$COUNT_TOTAL packages attempted to build in total." +echo "$COUNT_GOOD packages successfully built reproducibly: ${GOOD}" +echo "$COUNT_BAD packages failed to built reproducibly: ${BAD}" +echo "$COUNT_UGLY packages failed to build from source: ${UGLY}" +echo "$COUNT_SOURCELESS packages doesn't exist in sid and need investigation: $SOURCELESS" -- cgit v1.2.3-70-g09d2