summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-09-28 10:11:25 +0200
committerHolger Levsen <holger@layer-acht.org>2014-09-28 10:11:25 +0200
commit32bc98580ef1e34d81497bdc936794cb2598b06b (patch)
tree8402a10b88a3c5b25c6e3e1e7699306f511ca9bf /bin
parent2e9d95eb6d884b0fc383a64a255ba95734aed54c (diff)
downloadjenkins.debian.net-32bc98580ef1e34d81497bdc936794cb2598b06b.tar.xz
reproducible: create simple html statistics page with links to all diffp files
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_stats.sh36
1 files changed, 21 insertions, 15 deletions
diff --git a/bin/reproducible_stats.sh b/bin/reproducible_stats.sh
index f1ed81cf..aed99e8b 100755
--- a/bin/reproducible_stats.sh
+++ b/bin/reproducible_stats.sh
@@ -20,23 +20,29 @@ SOURCELESS=$(sqlite3 $PACKAGES_DB "SELECT name FROM source_packages WHERE status
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
-echo "$COUNT_GOOD packages successfully built reproducibly: ${GOOD}"
-echo
-echo "$COUNT_BAD packages failed to built reproducibly: ${BAD}"
-echo
-echo "$COUNT_UGLY packages failed to build from source: ${UGLY}"
-echo "$COUNT_SOURCELESS packages doesn't exist in sid and need investigation: $SOURCELESS"
+htmlecho() {
+ echo "$1" >> index.html
+}
+rm index.html
-echo "<html><body><p>Hello World<ul>" > index.html
+htmlecho "<html><body>" > index.html
+htmlecho
+htmlecho "<h2>Simple statistics for reproducible builds as tested on jenkins.debian.net so far</h2>"
+htmlecho
+htmlecho "<p>$COUNT_TOTAL packages attempted to build in total.</p>"
+htmlecho
+htmlecho "<p>$COUNT_GOOD packages successfully built reproducibly: <code>${GOOD}</code></p>"
+htmlecho
+htmlecho "$COUNT_BAD packages failed to built reproducibly: <code>"
for PKG in $BAD ; do
VERSION=$(sqlite3 $PACKAGES_DB "SELECT version FROM source_packages WHERE name = \"$PKG\"")
- echo "<li><a href=https://$JENKINS_URL/userContent/diffp/${PKG}_${VERSION}>diffp output for $PKG</a></li> " >> index.html
+ htmlecho "<a href=$JENKINS_URL/userContent/diffp/${PKG}_${VERSION}.diffp>$PKG </a> "
done
-echo "</ul></p></body></html>" >> index.html
-
+htmlecho "</code></p>"
+htmlecho
+htmlecho "$COUNT_UGLY packages failed to build from source: <code>${UGLY}</code></p>"
+htmlecho "$COUNT_SOURCELESS packages doesn't exist in sid and need investigation: <code>$SOURCELESS<code></p>"
+htmlecho "</ul></p></body></html>"
+# job output
+html2text index.html