[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible coreboot: reorder presentation of results

Holger Levsen holger at moszumanska.debian.org
Thu Jun 11 09:57:26 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 1ffd55da56f64558fbadafad1f99f4e9a2ba8e6b
Author: Holger Levsen <holger at layer-acht.org>
Date:   Thu Jun 11 11:56:57 2015 +0200

    reproducible coreboot: reorder presentation of results
---
 bin/reproducible_coreboot.sh  | 79 +++++++++++++++++++++++--------------------
 bin/reproducible_scheduler.py | 39 +++++++++++++++++----
 2 files changed, 76 insertions(+), 42 deletions(-)

diff --git a/bin/reproducible_coreboot.sh b/bin/reproducible_coreboot.sh
index 9843024..1e45da9 100755
--- a/bin/reproducible_coreboot.sh
+++ b/bin/reproducible_coreboot.sh
@@ -195,13 +195,47 @@ cd ..
 rm coreboot-builds -r
 cd ..
 
+# run debbindiff on the results
 TIMEOUT="30m"
 DBDSUITE="unstable"
 DBDVERSION="$(schroot --directory /tmp -c source:jenkins-reproducible-${DBDSUITE}-debbindiff debbindiff -- --version 2>&1)"
 echo "============================================================================="
 echo "$(date -u) - Running $DBDVERSION on coreboot images now"
 echo "============================================================================="
-# and creating the webpage while we're at it
+ROMS_HTML=$(mktemp)
+echo "       <ul>" > $ROMS_HTML
+BAD_ROMS=0
+GOOD_ROMS=0
+ALL_ROMS=0
+create_results_dirs
+cd b1
+for i in * ; do
+	let ALL_ROMS+=1
+	if [ -f $i/coreboot.rom ] ; then
+		call_debbindiff $i
+		SIZE="$(du -h -b $i/coreboot.rom | cut -f1)"
+		SIZE="$(echo $SIZE/1024|bc)"
+		if [ -f $TMPDIR/$i.html ] ; then
+			mv $TMPDIR/$i.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}K) is unreproducible.</li>" >> $ROMS_HTML
+		else
+			SHASUM=$(sha256sum $i/coreboot.rom|cut -d " " -f1)
+			echo "         <li><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $i ($SHASUM, ${SIZE}K) is reproducible.</li>" >> $ROMS_HTML
+			let GOOD_ROMS+=1
+			rm -f $BASE/coreboot/dbd/$i.html # cleanup from previous (unreproducible) tests - if needed
+		fi
+	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.</li>" >> $ROMS_HTML
+		let BAD_ROMS+=1
+	fi
+done
+echo "       </ul>" >> $ROMS_HTML
+GOOD_PERCENT=$(echo "scale=1 ; ($GOOD_ROMS*100/$ALL_ROMS)" | bc)
+BAD_PERCENT=$(echo "scale=1 ; ($BAD_ROMS*100/$ALL_ROMS)" | bc)
+
+#
+#  finally create the webpage
+#
 PAGE=$PWD/coreboot/coreboot.html
 cat > $PAGE <<- EOF
 <!DOCTYPE html>
@@ -224,45 +258,18 @@ cat > $PAGE <<- EOF
        </center></p>
 EOF
 write_page "       <h1>Reproducible Coreboot</h1>"
-write_page "       <p><em>Reproducible builds</em> enable anyone to reproduce bit by bit identical binary packages from a given source, so that anyone can verify that a given binary derived from the source it was said to be derived. There is a lot more information about <a href=\"https://wiki.debian.org/ReproducibleBuilds\">reproducible builds on the Debian wiki</a> and on <a href=\"https://reproducible.debian.net\">https://reproducible.debian.net</a>. The wiki has a lot more information [...]
+write_page "       <p><em>Reproducible builds</em> enable anyone to reproduce bit by bit identical binary packages from a given source, so that anyone can verify that a given binary derived from the source it was said to be derived. There is a lot more information about <a href=\"https://wiki.debian.org/ReproducibleBuilds\">reproducible builds on the Debian wiki</a> and on <a href=\"https://reproducible.debian.net\">https://reproducible.debian.net</a>. The wiki has a lot more information [...]
 write_page "        <em>Reproducible Coreboot</em> is an effort to apply this to coreboot. Thus each coreboot.rom is build twice (without payloads), with a few varitations added and then those two ROMs are compared using <a href=\"https://tracker.debian.org/debbindiff\">debbindiff</a>. Please note that the toolchain is not varied at all as the rebuild happens on exactly the same system. More variations are expected to be seen in the wild.</p>"
 write_page "       <p>There is a monthly run <a href=\"https://jenkins.debian.net/view/reproducible/job/reproducible_coreboot/\">jenkins job</a> to test the <code>master</code> branch of <a href=\"https://review.coreboot.org/p/coreboot.git\">coreboot.git</a>. Currently this job is triggered more often though, because this is still under development and brand new. The jenkins job is simply running <a href=\"http://anonscm.debian.org/cgit/qa/jenkins.debian.net.git/tree/bin/reproducible_cor [...]
-write_page "<p><pre>"
-echo -n "$COREBOOT" >> $PAGE
-write_page "       </pre></p>"
+write_page "       <p>$GOOD_ROMS ($GOOD_PERCENT%) out of $ALL_ROMS built coreboot images were reproducible in our test setup, while $BAD_ROMS ($BAD_PERCENT%) failed to build from source."
+write_page "        These tests were last run on $DATE for version ${COREBOOT_VERSION}.</p>"
 write_explaination_table coreboot
-write_page "       <ul>"
-BAD_ROMS=0
-GOOD_ROMS=0
-ALL_ROMS=0
-create_results_dirs
-cd b1
-for i in * ; do
-	let ALL_ROMS+=1
-	if [ -f $i/coreboot.rom ] ; then
-		call_debbindiff $i
-		SIZE="$(du -h -b $i/coreboot.rom | cut -f1)"
-		SIZE="$(echo $SIZE/1024|bc)"
-		if [ -f $TMPDIR/$i.html ] ; then
-			mv $TMPDIR/$i.html $BASE/coreboot/dbd/$i.html
-			write_page "         <li><a href=\"dbd/$i.html\"><img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> $i</a> (${SIZE}K) is unreproducible.</li>"
-		else
-			SHASUM=$(sha256sum $i/coreboot.rom|cut -d " " -f1)
-			write_page "         <li><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $i ($SHASUM, ${SIZE}K) is reproducible.</li>"
-			let GOOD_ROMS+=1
-			rm -f $BASE/coreboot/dbd/$i.html # cleanup from previous (unreproducible) tests - if needed
-		fi
-	else
-		write_page "         <li><img src=\"/userContent/static/weather-storm.png\" alt=\"FTBFS icon\" /> $i <a href=\"${BUILD_URL}console\">failed to build</a> from source.</li>"
-		let BAD_ROMS+=1
-	fi
-done
-GOOD_PERCENT=$(echo "scale=1 ; ($GOOD_ROMS*100/$ALL_ROMS)" | bc)
-BAD_PERCENT=$(echo "scale=1 ; ($BAD_ROMS*100/$ALL_ROMS)" | bc)
-write_page "       </ul><p>$GOOD_ROMS ($GOOD_PERCENT%) out of $ALL_ROMS built coreboot images were reproducible in our test setup, while $BAD_ROMS ($BAD_PERCENT%) failed to build from source."
-write_page "       These tests were last run on $DATE for version ${COREBOOT_VERSION}.</p>"
+cat $ROMS_HTML >> $PAGE
 cat $TOOLCHAIN_HTML >> $PAGE
-rm -f $TOOLCHAIN_HTML
+rm -f $ROMS_HTML $TOOLCHAIN_HTML
+write_page "     <p><pre>"
+echo -n "$COREBOOT" >> $PAGE
+write_page "     </pre></p>"
 write_page "    </div></div>"
 write_page_footer coreboot
 cd ..
diff --git a/bin/reproducible_scheduler.py b/bin/reproducible_scheduler.py
index 85e3d60..4a60fe0 100755
--- a/bin/reproducible_scheduler.py
+++ b/bin/reproducible_scheduler.py
@@ -304,12 +304,39 @@ def scheduler():
     # update the scheduled page
     generate_schedule()  # from reproducible_html_indexes
     # build the kgb message text
-    message = 'Scheduled in ' + '+'.join(SUITES) + ': ' + \
-              add_up_numbers(untested) + ' new and untested packages, ' + \
-              add_up_numbers(new) + ' packages with new versions and ' + \
-              add_up_numbers(old) + ' old packages with the same version, ' + \
-              'for ' + str(total) + ' or ' + \
-              '+'.join([str(now_queued_here[x]) for x in SUITES]) + ' packages in total.'
+    message = 'Scheduled in ' + '+'.join(SUITES) + ': '
+    msgs = 0
+    if add_up_numbers(untested) != '0':
+      msg_untested = add_up_numbers(untested) + ' new and untested packages'
+      msgs += 1
+    else:
+      msg_untested = ''
+    if add_up_numbers(new) != '0':
+      msg_versions = add_up_numbers(new) + ' packages with new versions'
+      msgs += 1
+    else:
+      msg_versions = ''
+    if add_up_numbers(old) != '0':
+      msg_old = add_up_numbers(old) + ' old packages with the same version'
+      msgs += 1
+    else:
+      msg_old = ''
+    if len(msg_untested) != 0
+      message += msg_untested
+      if msgs == 2:
+        message += ' and'
+      else:
+        message += ','
+    if len(msg_versions) != 0
+      message += msg_versions
+      if msgs == 3:
+        message += ' and'
+      else:
+        message += ','
+    if len(msg_old) != 0
+      message += msg_old + ','
+    message += 'for ' + str(total) + ' or ' + \
+               '+'.join([str(now_queued_here[x]) for x in SUITES]) + ' packages in total.'
     log.info('\n\n\n')
     log.info(message)
     # only notifiy irc if there were packages scheduled in any suite

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list