abuild: improve --remove

Make abuild -r work in more sitations (eg. xargs parallelization),
and make it not break junit output.

Also tell Kconfig to just overwrite the config file, instead of
atomically updating it, which help if coreboot-builds is on a
different filesystem (eg. tmpfs).

Change-Id: I2f4eedfd34ea6771732a60b38f1856056089be23
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/4542
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
This commit is contained in:
Patrick Georgi 2013-12-19 20:13:23 +01:00
parent f422a443d7
commit d03d69bf18
1 changed files with 7 additions and 4 deletions

View File

@ -25,6 +25,8 @@ TARGET=coreboot-builds
XMLFILE=$TOP/abuild.xml XMLFILE=$TOP/abuild.xml
REAL_XMLFILE=$XMLFILE REAL_XMLFILE=$XMLFILE
export KCONFIG_OVERWRITECONFIG=1
# path to payload. Should be more generic # path to payload. Should be more generic
PAYLOAD=/dev/null PAYLOAD=/dev/null
@ -301,8 +303,8 @@ function build_target
HOSTCC='gcc' HOSTCC='gcc'
printf "Building $VENDOR/$MAINBOARD; " printf "Building $VENDOR/$MAINBOARD; "
mkdir -p $TOP/$TARGET/${VENDOR}_${MAINBOARD} mkdir -p $TOP/$TARGET/${VENDOR}_${MAINBOARD} $TOP/$TARGET/abuild
XMLFILE=$TOP/$TARGET/${VENDOR}_${MAINBOARD}/abuild.xml XMLFILE=$TOP/$TARGET/abuild/${VENDOR}_${MAINBOARD}.xml
if [ "$ARCH" = "$TARCH" -o $found_crosscompiler = true ]; then if [ "$ARCH" = "$TARCH" -o $found_crosscompiler = true ]; then
printf "$TARCH: ok$CROSS_TEXT\n" printf "$TARCH: ok$CROSS_TEXT\n"
@ -639,7 +641,8 @@ if [ "$target" != "" ]; then
else else
build_target $VENDOR $MAINBOARD $CONFIG build_target $VENDOR $MAINBOARD $CONFIG
test_target $VENDOR $MAINBOARD test_target $VENDOR $MAINBOARD
test "$mode" != "text" && cat $TARGET/${VENDOR}_${MAINBOARD}/abuild.xml >> $REAL_XMLFILE remove_target $VENDOR $MAINBOARD
test "$mode" != "text" && cat $TARGET/abuild/${VENDOR}_${MAINBOARD}.xml >> $REAL_XMLFILE
XMLFILE=$REAL_XMLFILE XMLFILE=$REAL_XMLFILE
fi fi
else else
@ -649,7 +652,7 @@ else
junit '<?xml version="1.0" encoding="utf-8"?>' junit '<?xml version="1.0" encoding="utf-8"?>'
junit '<testsuite>' junit '<testsuite>'
if [ "$mode" != "text" ]; then if [ "$mode" != "text" ]; then
for xmlfile in $TARGET/*_*/abuild.xml; do for xmlfile in $TARGET/abuild/*_*.xml; do
cat $xmlfile >> $REAL_XMLFILE cat $xmlfile >> $REAL_XMLFILE
done done
fi fi