diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-08-26 01:53:47 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-08-26 01:53:47 +0200 |
commit | ab548f227dbb17dbeb96ef38db56e09d05ed0300 (patch) | |
tree | 62226c8104f908f4b817864251d1667b52c964a2 /bin | |
parent | f8c753e72a133f35bd2cdd33a37f24fb877f105b (diff) | |
download | jenkins.debian.net-ab548f227dbb17dbeb96ef38db56e09d05ed0300.tar.xz |
reproducible openwrt: sort unreproducible packages up and boring reproducible ones down
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_openwrt.sh | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh index 8caf986a..b5ce8a27 100755 --- a/bin/reproducible_openwrt.sh +++ b/bin/reproducible_openwrt.sh @@ -210,6 +210,8 @@ echo "========================================================================== echo "$(date -u) - Running $DIFFOSCOPE on OpenWrt images and packages." echo "=============================================================================" DBD_HTML=$(mktemp --tmpdir=$TMPDIR) +DBD_GOOD_PKGS_HTML=$(mktemp --tmpdir=$TMPDIR) +DBD_BAD_PKGS_HTML=$(mktemp --tmpdir=$TMPDIR) # run diffoscope on the images GOOD_IMAGES=0 ALL_IMAGES=0 @@ -265,11 +267,10 @@ for i in * ; do PKGS2=$(find * -type f -name "*.ipk" | sort -u ) popd - echo " <table><tr><th>Packages for <code>$i</code></th></tr>" >> $DBD_HTML for j in $(printf "$PKGS1\n$PKGS2" | sort -u ) ; do let ALL_PACKAGES+=1 if [ ! -f $TMPDIR/b1/$i/$j -o ! -f $TMPDIR/b2/$i/$j ] ; then - echo " <tr><td><img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> $j (${SIZE}K) failed to build once.</td></tr>" >> $DBD_HTML + echo " <tr><td><img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> $j (${SIZE}K) failed to build once.</td></tr>" >> $DBD_BAD_PKGS_HTML rm -f $BASE/openwrt/dbd/$i/$j.html # cleanup from previous (unreproducible) tests - if needed continue fi @@ -278,17 +279,22 @@ for i in * ; do if [ -f $TMPDIR/$i/$j.html ] ; then mkdir -p $BASE/openwrt/dbd/$i/$(dirname $j) mv $TMPDIR/$i/$j.html $BASE/openwrt/dbd/$i/$j.html - echo " <tr><td><a href=\"dbd/$i/$j.html\"><img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> $j</a> ($SIZE) is unreproducible.</td></tr>" >> $DBD_HTML + echo " <tr><td><a href=\"dbd/$i/$j.html\"><img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> $j</a> ($SIZE) is unreproducible.</td></tr>" >> $DBD_BAD_PKGS_HTML else SHASUM=$(sha256sum $j|cut -d " " -f1) - echo " <tr><td><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $j ($SHASUM, $SIZE) is reproducible.</td></tr>" >> $DBD_HTML + echo " <tr><td><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $j ($SHASUM, $SIZE) is reproducible.</td></tr>" >> $DBD_GOOD_PKGS_HTML let GOOD_PACKAGES+=1 rm -f $BASE/openwrt/dbd/$i/$j.html # cleanup from previous (unreproducible) tests - if needed fi done cd .. - echo " </table>" >> $DBD_HTML done +echo " <table><tr><th>Unreproducible packages</th></tr>" >> $DBD_HTML +cat $DBD_BAD_PKGS_HTML >> $DBD_HTML +echo " </table>" >> $DBD_HTML +echo " <table><tr><th>Reproducible packages</th></tr>" >> $DBD_HTML +cat $DBD_GOOD_PKGS_HTML >> $DBD_HTML +echo " </table>" >> $DBD_HTML GOOD_PERCENT_PACKAGES=$(echo "scale=1 ; ($GOOD_PACKAGES*100/$ALL_PACKAGES)" | bc) # are we there yet? if [ "$GOOD_PERCENT_IMAGES" = "100.0" ] || [ "$GOOD_PERCENT_PACKAGES" = "100.0" ]; then @@ -332,7 +338,7 @@ cat $TOOLCHAIN_HTML >> $PAGE write_page " </div>" write_page_footer OpenWrt publish_page -rm -f $DBD_HTML $TOOLCHAIN_HTML $BANNER_HTML +rm -f $DBD_HTML $DBD_GOOD_PKGS_HTML $DBD_BAD_PKGS_HTML $TOOLCHAIN_HTML $BANNER_HTML # the end calculate_build_duration |