From 6f0e160459aa7d1de34da85978df5f3282c973ce Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Thu, 5 Dec 2013 19:36:31 +0100 Subject: abuild: drop xml mode We use junit style output these days. Change-Id: I4110ec10bf0e9f4354ee08e7e1c5a81ae605fee0 Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/4484 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer Reviewed-by: Paul Menzel --- util/abuild/abuild | 74 +++--------------------------------------------------- 1 file changed, 4 insertions(+), 70 deletions(-) diff --git a/util/abuild/abuild b/util/abuild/abuild index 706bb2a7e3..18f39c3d51 100755 --- a/util/abuild/abuild +++ b/util/abuild/abuild @@ -60,7 +60,7 @@ if [ "$i" = "nonexistant_make" ]; then fi MAKE=$i -# this can be changed to xml by -x +# this can be changed to junit by -J mode=text # silent mode.. no compiler calls, only warnings in the log files. @@ -83,7 +83,7 @@ trap interrupt INT function interrupt { printf "\n$0: execution interrupted manually.\n" - if [ "$mode" == "xml" ]; then + if [ "$mode" == "junit" ]; then printf "$0: deleting incomplete xml output file.\n" fi exit 1 @@ -94,21 +94,6 @@ function debug test "$verbose" == "true" && printf "$*\n" } -function xml -{ - test "$mode" == "xml" && printf "$*\n" >> $XMLFILE - return 0 -} - -function xmlfile -{ - test "$mode" == "xml" && { - printf '\n' - } >> $XMLFILE -} - function junit { test "$mode" == "junit" && printf "$*\n" >> $XMLFILE @@ -181,11 +166,9 @@ function create_config if [ "$CONFIG" != "" ]; then printf " Using existing configuration $CONFIG ... " - xml " $CONFIG" cp src/mainboard/$VENDOR/$MAINBOARD/$CONFIG ${build_dir}/config.build else printf " Creating config file... " - xml " autogenerated" grep "if[\t ]*VENDOR" src/mainboard/$VENDOR/$MAINBOARD/../Kconfig | \ sed "s,^.*\(VENDOR_.*\)[^A-Z0-9_]*,CONFIG_\1=y," > ${build_dir}/config.build grep "if[\t ]*BOARD" src/mainboard/$VENDOR/$MAINBOARD/Kconfig | \ @@ -210,20 +193,10 @@ function create_config ret=$? if [ $ret -eq 0 ]; then printf "ok; " - xml " ok" - xml " " - xmlfile $build_dir/config.log - xml " " - xml "" return 0 else # Does this ever happen? printf "FAILED!\nLog excerpt:\n" - xml " failed" - xml " " - xmlfile $build_dir/config.log - xml " " - xml "" tail -n $CONTEXT $build_dir/config.log 2> /dev/null || tail -$CONTEXT $build_dir/config.log return 1 fi @@ -274,15 +247,9 @@ function compile_target etime=`perl -e 'print time();' 2>/dev/null || date +%s` duration=$(( $etime - $stime )) - xml " ${duration}s" junit " " - xml " " - xmlfile make.log - xml " " - if [ $ret -eq 0 ]; then - xml " ok" junit "" junitfile make.log junit "" @@ -291,7 +258,6 @@ function compile_target cd $CURR return 0 else - xml " failed" junit "" junitfile make.log junit "" @@ -338,14 +304,6 @@ function build_target mkdir -p $TOP/$TARGET/${VENDOR}_${MAINBOARD} XMLFILE=$TOP/$TARGET/${VENDOR}_${MAINBOARD}/abuild.xml - xml "" - xml "" - xml " $VENDOR" - xml " $MAINBOARD" - xml "" - xml " $TARCH" - xml "" - if [ "$ARCH" = "$TARCH" -o $found_crosscompiler = true ]; then printf "$TARCH: ok$CROSS_TEXT\n" else @@ -383,10 +341,6 @@ function build_target # Check result: if [ $found_crosscompiler == "false" ]; then printf "$TARCH: skipped, we're $ARCH\n\n" - xml " notbuilt" - xml "" - xml "" - junit "" junit " No cross-compiler for $TARCH found" junit "" @@ -394,11 +348,6 @@ function build_target return 0 else printf "$TARCH: ok, $ARCH using ${CROSS_COMPILE}gcc\n" - xml " " - xml " `which ${CROSS_COMPILE}gcc`" - xml " `${CROSS_COMPILE}gcc --version | head -1`" - xml " " - xml "" fi fi @@ -414,9 +363,7 @@ function build_target if [ "$scanbuild" = "true" ]; then rm -rf $TARGET/scan-build-results-tmp fi - compile_target $VENDOR $MAINBOARD && - xml " ok" || - xml "broken" + compile_target $VENDOR $MAINBOARD if [ "$scanbuild" = "true" ]; then rm -rf $TARGET/${VENDOR}_${MAINBOARD}-scanbuild mv `dirname $TARGET/scan-build-results-tmp/*/index.html` $TARGET/${VENDOR}_${MAINBOARD}-scanbuild @@ -425,10 +372,7 @@ function build_target # Not calculated here because we still print it in compile_target #etime=`perl -e 'print time();' 2>/dev/null || date +%s` #duration=$(( $etime - $stime )) - #xml " ${duration}s" - xml "" - xml "" junit "" printf "\n" @@ -506,8 +450,6 @@ function myhelp printf " [-p|--payloads ] use payloads in to build images\n" printf " [-V|--version] print version number and exit\n" printf " [-h|--help] print this help and exit\n" - printf " [-x|--xml] write xml log file \n" - printf " (defaults to $XMLFILE)\n" printf " [-J|--junit] write JUnit formatted xml log file \n" printf " (defaults to $XMLFILE)\n" printf " [-T|--test] submit image(s) to automated test system\n" @@ -561,7 +503,7 @@ cmdline="$* -c 1" getoptbrand="`getopt -V`" if [ "${getoptbrand:0:6}" == "getopt" ]; then # Detected GNU getopt that supports long options. - args=`getopt -l version,verbose,help,all,target:,payloads:,test,cpus:,silent,junit,xml,config,loglevel:,remove,prefix:,update,nostackprotect,scan-build,ccache,blobs -o Vvhat:p:Tc:sJxCl:rP:uyB -- "$@"` || exit 1 + args=`getopt -l version,verbose,help,all,target:,payloads:,test,cpus:,silent,junit,config,loglevel:,remove,prefix:,update,nostackprotect,scan-build,ccache,blobs -o Vvhat:p:Tc:sJCl:rP:uyB -- "$@"` || exit 1 eval set -- $args else # Detected non-GNU getopt @@ -578,7 +520,6 @@ customizing="" configoptions="" while true ; do case "$1" in - -x|--xml) shift; mode=xml; rm -f $XMLFILE ;; -J|--junit) shift; mode=junit; rm -f $XMLFILE ;; -t|--target) shift; target="$1"; shift;; -a|--all) shift; buildall=true;; @@ -684,9 +625,6 @@ test -z "$1" || ROOT=$1 debug "ROOT=$ROOT" -xml '' -xml '' - junit '' junit '' @@ -708,9 +646,6 @@ else build_all_targets rm -f $REAL_XMLFILE XMLFILE=$REAL_XMLFILE - xml '' - xml '' - junit '' junit '' if [ "$mode" != "text" ]; then @@ -720,7 +655,6 @@ else fi XMLFILE=$REAL_XMLFILE fi -xml '' junit '' exit $failed -- cgit v1.2.3