[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible Arch Linux: record and display test duration
Holger Levsen
holger at layer-acht.org
Tue Nov 28 22:41:17 UTC 2017
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 6a6c44ba4ba17df3151ddf9e7571c6318ee075f2
Author: Holger Levsen <holger at layer-acht.org>
Date: Tue Nov 28 22:41:04 2017 +0000
reproducible Arch Linux: record and display test duration
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
bin/reproducible_build_archlinux_pkg.sh | 2 ++
bin/reproducible_html_archlinux.sh | 13 ++++++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 800180c..5051a6b 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -438,9 +438,11 @@ else
echo "$(date -u) - build1 didn't create a package, skipping build2!"
fi
# publish logs
+calculate_build_duration
cd $TMPDIR/b1/$SRCPACKAGE
cp build1.log $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/
[ ! -f $TMPDIR/b2/$SRCPACKAGE/build2.log ] || cp $TMPDIR/b2/$SRCPACKAGE/build2.log $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/
+echo $DURATION > $BASE/archlinux/$REPOSITORY/$SRCPACKAGE/pkg.build_duration || true
echo "$(date -u) - $REPRODUCIBLE_URL/archlinux/$REPOSITORY/$SRCPACKAGE/ updated."
cd
diff --git a/bin/reproducible_html_archlinux.sh b/bin/reproducible_html_archlinux.sh
index 85c3c9e..211c9a5 100755
--- a/bin/reproducible_html_archlinux.sh
+++ b/bin/reproducible_html_archlinux.sh
@@ -150,6 +150,17 @@ for REPOSITORY in $ARCHLINUX_REPOS ; do
fi
echo " </td>" >> $HTML_BUFFER
echo " <td>$(LANG=C TZ=UTC ls --full-time $ARCHLINUX_PKG_PATH/build1.log | cut -d ':' -f1-2 | cut -d " " -f6- ) UTC</td>" >> $HTML_BUFFER
+ DURATION=$(cat $ARCHLINUX_PKG_PATH/pkg.build_duration 2>/dev/null || true)
+ if [ -n "$DURATION" ]; then
+ HOUR=$(echo "$DURATION/3600"|bc)
+ MIN=$(echo "($DURATION-$HOUR*3600)/60"|bc)
+ SEC=$(echo "$DURATION-$HOUR*3600-$MIN*60"|bc)
+ BUILD_DURATION="$HOUR:$MIN:$SEC"
+ else
+ BUILD_DURATION=" "
+ fi
+ echo " <td>$BUILD_DURATION</td>" >> $HTML_BUFFER
+
for LOG in build1.log build2.log ; do
if [ -f $ARCHLINUX_PKG_PATH/$LOG ] ; then
get_filesize $ARCHLINUX_PKG_PATH/$LOG
@@ -250,7 +261,7 @@ write_page " <table><tr><th>repository</th><th>all source packages</th><th>re
cat $HTML_REPOSTATS >> $PAGE
rm $HTML_REPOSTATS > /dev/null
write_page " </table>"
-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>"
+write_page " <table><tr><th>repository</th><th>source package</th><th>test result</th><th>test date</th><th>test duration</th><th>1st build log</th><th>2nd build log</th></tr>"
# output all HTML snipplets
for i in UNKNOWN $(for j in $MEMBERS_404 ; do echo 404_$j ; done) $(for j in $MEMBERS_DEPWAIT ; do echo DEPWAIT_$j ; done) $(for j in $MEMBERS_FTBFS ; do echo FTBFS_$j ; done) $(for j in $MEMBERS_FTBR ; do echo FTBR_$j ; done) GOOD ; do
for REPOSITORY in $ARCHLINUX_REPOS ; do
--
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