summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_html_archlinux.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-12-12 10:35:56 +0100
committerHolger Levsen <holger@layer-acht.org>2015-12-12 10:35:56 +0100
commit866c0c89c8e54df7ff53bfb841a436054943cdf6 (patch)
tree9590ad1f8f4065c02cf76623971cf7e6042a7025 /bin/reproducible_html_archlinux.sh
parentd8e57c9ec225eb864eace752d73db8622062b20a (diff)
downloadjenkins.debian.net-866c0c89c8e54df7ff53bfb841a436054943cdf6.tar.xz
reproducible archlinux: sort html results
Diffstat (limited to 'bin/reproducible_html_archlinux.sh')
-rwxr-xr-xbin/reproducible_html_archlinux.sh59
1 files changed, 41 insertions, 18 deletions
diff --git a/bin/reproducible_html_archlinux.sh b/bin/reproducible_html_archlinux.sh
index 4223efda..a92497b8 100755
--- a/bin/reproducible_html_archlinux.sh
+++ b/bin/reproducible_html_archlinux.sh
@@ -38,6 +38,14 @@ EOF
write_page_intro 'Arch Linux'
write_explaination_table 'Arch Linux'
write_page " <table><tr><th>repository</th><th>source package</th><th>test result</th><th>test date</th><th>1st build log</th><th>2nd build log</th></tr>"
+HTML_FTBFS=$(mktemp)
+HTML_FTBR=$(mktemp)
+HTML_DEPWAIT=$(mktemp)
+HTML_404=$(mktemp)
+HTML_GOOD=$(mktemp)
+HTML_UNKNOWN=$(mktemp)
+HTML_BUFFER=$(mktemp)
+HTML_TARGET=""
for REPOSITORY in $ARCHLINUX_REPOS ; do
for PKG in $(find $ARCHBASE/$REPOSITORY/* -maxdepth 1 -type d -exec basename {} \;) ; do
if [ -z "$(cd $ARCHBASE/$REPOSITORY/$PKG/ ; ls)" ] ; then
@@ -45,46 +53,61 @@ for REPOSITORY in $ARCHLINUX_REPOS ; do
echo "$(date -u ) - ignoring $PKG from '$REPOSITORY' which is building right now…"
continue
fi
- write_page " <tr>"
- write_page " <td>$REPOSITORY</td>"
- write_page " <td>$PKG</td>"
- write_page " <td>"
+ echo " <tr>" >> $HTML_BUFFER
+ echo " <td>$REPOSITORY</td>" >> $HTML_BUFFER
+ echo " <td>$PKG</td>" >> $HTML_BUFFER
+ echo " <td>" >> $HTML_BUFFER
if [ -z "$(cd $ARCHBASE/$REPOSITORY/$PKG/ ; ls *.pkg.tar.xz.html 2>/dev/null)" ] ; then
if [ ! -z "$(grep '==> ERROR: Could not resolve all dependencies' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
- write_page " <img src=\"/userContent/static/weather-snow.png\" alt=\"depwait icon\" /> could not resolve dependencies"
+ HTML_TARGET=$HTML_DEPWAIT
+ echo " <img src=\"/userContent/static/weather-snow.png\" alt=\"depwait icon\" /> could not resolve dependencies" >> $HTML_BUFFER
elif [ ! -z "$(egrep '==> ERROR: .pacman. failed to install missing dependencies.' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
- write_page " <img src=\"/userContent/static/weather-snow.png\" alt=\"depwait icon\" /> failed to install dependencies"
+ HTML_TARGET=$HTML_DEPWAIT
+ echo " <img src=\"/userContent/static/weather-snow.png\" alt=\"depwait icon\" /> failed to install dependencies" >> $HTML_BUFFER
elif [ ! -z "$(egrep '==> ERROR: A failure occurred in (build|package)' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
- write_page " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build from source"
+ HTML_TARGET=$HTML_FTBFS
+ echo " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build from source" >> $HTML_BUFFER
elif [ ! -z "$(egrep '==> ERROR: A failure occurred in check' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
- write_page " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build from source, while running tests"
+ HTML_TARGET=$HTML_FTBFS
+ echo " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build from source, while running tests" >> $HTML_BUFFER
elif [ ! -z "$(egrep '==> ERROR: Failure while downloading' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
- write_page " <img src=\"/userContent/static/weather-severe-alert.png\" alt=\"404 icon\" /> failed to download source"
+ HTML_TARGET=$HTML_404
+ echo " <img src=\"/userContent/static/weather-severe-alert.png\" alt=\"404 icon\" /> failed to download source" >> $HTML_BUFFER
elif [ ! -z "$(egrep '==> ERROR: One or more files did not pass the validity check' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
- write_page " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to verify source"
+ HTML_TARGET=$HTML_FTBFS
+ echo " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to verify source" >> $HTML_BUFFER
elif [ ! -z "$(egrep 'makepkg was killed by timeout after 4h' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
- write_page " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build, killed by timeout after 4h"
+ HTML_TARGET=$HTML_FTBFS
+ echo " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build, killed by timeout after 4h" >> $HTML_BUFFER
else
- write_page " probably failed to build from source, please investigate"
+ echo " probably failed to build from source, please investigate" >> $HTML_BUFFER
+ HTML_TARGET=$HTML_UNKNOWN
# or is it reproducible???
fi
else
+ HTML_TARGET=$HTML_FTBR
for ARTIFACT in $(cd $ARCHBASE/$REPOSITORY/$PKG/ ; ls *.pkg.tar.xz.html) ; do
- write_page " <img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> <a href=\"/archlinux/$REPOSITORY/$PKG/$ARTIFACT\">${ARTIFACT:0:-5}</a> is unreproducible<br />"
+ echo " <img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> <a href=\"/archlinux/$REPOSITORY/$PKG/$ARTIFACT\">${ARTIFACT:0:-5}</a> is unreproducible<br />" >> $HTML_BUFFER
done
fi
- write_page " </td>"
- write_page " <td>$(LANG=C TZ=UTC ls --full-time $ARCHBASE/$REPOSITORY/$PKG/build1.log | cut -d ' ' -f6 )</td>"
+ echo " </td>" >> $HTML_BUFFER
+ echo " <td>$(LANG=C TZ=UTC ls --full-time $ARCHBASE/$REPOSITORY/$PKG/build1.log | cut -d ' ' -f6 )</td>" >> $HTML_BUFFER
for LOG in build1.log build2.log ; do
if [ -f $ARCHBASE/$REPOSITORY/$PKG/$LOG ] ; then
- write_page " <td><a href=\"/archlinux/$REPOSITORY/$PKG/$LOG\">$LOG</a></td>"
+ echo " <td><a href=\"/archlinux/$REPOSITORY/$PKG/$LOG\">$LOG</a></td>" >> $HTML_BUFFER
else
- write_page " <td>&nbsp;</td>"
+ echo " <td>&nbsp;</td>" >> $HTML_BUFFER
fi
done
- write_page " </tr>"
+ echo " </tr>" >> $HTML_BUFFER
+ cat $HTML_BUFFER >> $HTML_TARGET
+ rm $HTML_BUFFER > /dev/null
done
done
+for i in $HTML_UNKNOWN $HTML_FTBFS $HTML_DEPWAIT $HTML_404 $HTML_FTBR $HTML_GOOD ; do
+ cat $i >> $PAGE
+ rm $i > /dev/null
+done
write_page " </table>"
write_page "</div></div>"
write_page_footer 'Arch Linux'