summaryrefslogtreecommitdiff
path: root/util/abuild
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2015-09-15 17:30:52 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-09-16 07:43:43 +0000
commit053322f891961be7d7826617d2e68dab340f9a09 (patch)
tree7316b48abedb2d03a9afc21773f7ccdb17a0b678 /util/abuild
parent098c4a80962437c6d23dc3fde894a1c3a7bf0ca0 (diff)
abuild: log bulding tools
We build the coreboot utilities in a separate step as a minor optimization. When logging in junit format (for jenkins), we want to have a report on those as well (instead of an xml error). Change-Id: Ibcd3b02bce9a314c30b5f7414e9e4cf0149ffd6a Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/11641 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'util/abuild')
-rwxr-xr-xutil/abuild/abuild27
1 files changed, 26 insertions, 1 deletions
diff --git a/util/abuild/abuild b/util/abuild/abuild
index 788ed7d0db..73ec8c322e 100755
--- a/util/abuild/abuild
+++ b/util/abuild/abuild
@@ -602,7 +602,32 @@ build_all_targets()
rm -rf ${scanbuild_out}
BUILDPREFIX="scan-build -o ${scanbuild_out}tmp"
fi
- $BUILDPREFIX $MAKE -j $cpus DOTCONFIG=$TMPCFG obj=$TARGET/temp objutil=$TARGET/sharedutils tools || exit 1
+ mkdir -p $TARGET/abuild
+ local ABSPATH=`cd $TARGET/abuild; pwd`
+ local XMLFILE=$ABSPATH/__util.xml
+ local stime=`perl -e 'print time();' 2>/dev/null || date +%s`
+ $BUILDPREFIX $MAKE -j $cpus DOTCONFIG=$TMPCFG obj=$TARGET/temp objutil=$TARGET/sharedutils tools > $TARGET/sharedutils/make.log 2>&1
+ local ret=$?
+ local etime=`perl -e 'print time();' 2>/dev/null || date +%s`
+ local duration=$(( $etime - $stime ))
+
+ junit " <testcase classname='util' name='all' time='$duration' >"
+ if [ $ret -eq 0 ]; then
+ junit "<system-out>"
+ junitfile $TARGET/sharedutils/make.log
+ junit "</system-out>"
+ junit "</testcase>"
+ else
+ junit "<failure type='BuildFailed'>"
+ junitfile $TARGET/sharedutils/make.log
+ junit "</failure>"
+ junit "</testcase>"
+ return
+ fi
+ if [ $ret -eq 1 ]; then
+ return
+ fi
+
if [ "$scanbuild" = "true" ]; then
mv ${scanbuild_out}tmp/* ${scanbuild_out}
rmdir ${scanbuild_out}tmp