summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-12-14 18:40:47 +0100
committerHolger Levsen <holger@layer-acht.org>2015-12-14 18:40:47 +0100
commit6b483cce4f50c4defc7f99cef9a74867f58cc62a (patch)
tree50de77e43a6bda1c1c3d5d3813338f1139ba105c /bin
parent39dd0c054ea36176a4e1d067914e430dd86bad70 (diff)
downloadjenkins.debian.net-6b483cce4f50c4defc7f99cef9a74867f58cc62a.tar.xz
reproducible coreboot: refactor, sort boring reproducible ROMs at the bottom
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_coreboot.sh23
1 files changed, 14 insertions, 9 deletions
diff --git a/bin/reproducible_coreboot.sh b/bin/reproducible_coreboot.sh
index ef1cd130..7c8fe40f 100755
--- a/bin/reproducible_coreboot.sh
+++ b/bin/reproducible_coreboot.sh
@@ -159,8 +159,9 @@ DIFFOSCOPE="$(schroot --directory /tmp -c source:jenkins-reproducible-${DBDSUITE
echo "============================================================================="
echo "$(date -u) - Running $DIFFOSCOPE on coreboot images."
echo "============================================================================="
-ROMS_HTML=$(mktemp --tmpdir=$TMPDIR)
-echo " <ul>" > $ROMS_HTML
+ROW_FRAGMENTS_GOOD_ROMS=$(mktemp --tmpdir=$TMPDIR)
+ROW_FRAGMENTS_BAD_ROMS=$(mktemp --tmpdir=$TMPDIR)
+LIST_OBJECT=$(mktemp --tmpdir=$TMPDIR)
BAD_ROMS=0
GOOD_ROMS=0
ALL_ROMS=0
@@ -174,23 +175,27 @@ for i in $(ls -1d *| sort -u) ; do
get_filesize $i/coreboot.rom
if [ -f $TMPDIR/$i/coreboot.rom.html ] ; then
mv $TMPDIR/$i/coreboot.rom.html $BASE/coreboot/dbd/$i.html
- echo " <li><a href=\"dbd/$i.html\"><img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> $i</a> ($SIZE) is unreproducible.</li>" >> $ROMS_HTML
+ echo " <li><a href=\"dbd/$i.html\"><img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> $i</a> ($SIZE) is unreproducible.</li>" >> $ROW_FRAGMENTS_BAD_ROMS
else
SHASUM=$(sha256sum $i/coreboot.rom|cut -d " " -f1)
- echo " <li><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $i ($SHASUM, $SIZE) is reproducible.</li>" >> $ROMS_HTML
+ echo " <li><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $i ($SHASUM, $SIZE) is reproducible.</li>" >> $ROW_FRAGMENTS_GOOD_ROMS
let GOOD_ROMS+=1
rm -f $BASE/coreboot/dbd/$i.html # cleanup from previous (unreproducible) tests - if needed
fi
else
if [ ! -f $i/coreboot.rom ] ; then
- echo " <li><img src=\"/userContent/static/weather-storm.png\" alt=\"FTBFS icon\" /> $i <a href=\"${BUILD_URL}console\">failed to build</a> from source.</li>" >> $ROMS_HTML
+ echo " <li><img src=\"/userContent/static/weather-storm.png\" alt=\"FTBFS icon\" /> $i <a href=\"${BUILD_URL}console\">failed to build</a> from source.</li>" >> $ROW_FRAGMENTS_BAD_ROMS
else
- echo " <li><img src=\"/userContent/static/weather-storm.png\" alt=\"FTBFS icon\" /> $i <a href=\"${BUILD_URL}console\">failed to build</a> from source on the 2nd build.</li>" >> $ROMS_HTML
+ echo " <li><img src=\"/userContent/static/weather-storm.png\" alt=\"FTBFS icon\" /> $i <a href=\"${BUILD_URL}console\">failed to build</a> from source on the 2nd build.</li>" >> $ROW_FRAGMENTS_BAD_ROMS
fi
let BAD_ROMS+=1
fi
done
-echo " </ul>" >> $ROMS_HTML
+echo " <ul>" > $LIST_OBJECT
+cat $ROW_FRAGMENTS_BAD_ROMS >> $LIST_OBJECT
+cat $ROW_FRAGMENTS_GOOD_ROMS >> $LIST_OBJECT
+rm $ROW_FRAGMENTS_BAD_ROMS $ROW_FRAGMENTS_GOOD_ROMS > /dev/null
+echo " </ul>" >> $LIST_OBJECT
GOOD_PERCENT=$(echo "scale=1 ; ($GOOD_ROMS*100/$ALL_ROMS)" | bc)
BAD_PERCENT=$(echo "scale=1 ; ($BAD_ROMS*100/$ALL_ROMS)" | bc)
# are we there yet?
@@ -235,7 +240,7 @@ else
fi
write_page " These tests were last run on $DATE for version ${COREBOOT_VERSION} using ${DIFFOSCOPE}.</p>"
write_explaination_table coreboot
-cat $ROMS_HTML >> $PAGE
+cat $LIST_OBJECT >> $PAGE
write_page " <p><pre>"
echo -n "$COREBOOT" >> $PAGE
write_page " </pre></p>"
@@ -243,7 +248,7 @@ cat $TOOLCHAIN_HTML >> $PAGE
write_page " </div></div>"
write_page_footer coreboot
publish_page
-rm -f $ROMS_HTML $TOOLCHAIN_HTML
+rm -f $LIST_OBJECT $TOOLCHAIN_HTML
# the end
calculate_build_duration