summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2017-06-25 14:21:09 -0600
committerMartin Roth <martinroth@google.com>2017-06-29 14:42:50 +0000
commitd16022bdd470a8aedbb0ba5c5c2646a040ff1a9a (patch)
tree7ded5a7d55dea795212c8276ae8a43a61cc5bf14 /util
parentedd591d8cafa027489f8345f293a26e2e5f4a834 (diff)
util/abuild: Update abuild
- Improve logging - Add location of logfiles to failed board log. - Log when the shared utilities fail to build. - Log passing configs and print count of tested configs that passed. - Disable a couple of shellcheck warnings. - Remove some unused code. Change-Id: Ic2cf1c0a5f123d759aac7ce55092ad71314a8c9d Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20359 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'util')
-rwxr-xr-xutil/abuild/abuild24
1 files changed, 14 insertions, 10 deletions
diff --git a/util/abuild/abuild b/util/abuild/abuild
index 6473fcf69a..6591edf443 100755
--- a/util/abuild/abuild
+++ b/util/abuild/abuild
@@ -274,9 +274,13 @@ function update_config
# shellcheck disable=SC2059
printf "$configoptions" >> "${config_file}"
+ # shellcheck disable=SC2086
+ # Disabling SC2086 for "$silent" only
yes "" 2>/dev/null | $MAKE oldconfig $silent "DOTCONFIG=${config_file}" "obj=${build_dir}" "objutil=$TARGET/sharedutils" &> "${build_dir}/config.log" ; \
CONFIG_OK=$?
if [ $CONFIG_OK -eq 0 ]; then
+ # shellcheck disable=SC2086
+ # Disabling SC2086 for "$silent" only
$MAKE savedefconfig $silent DEFCONFIG="${defconfig_file}" DOTCONFIG="${config_file}" obj="${build_dir}" objutil="$TARGET/sharedutils" &>> "${build_dir}/config.log"
return $?
else
@@ -361,6 +365,7 @@ function compile_target
junit "</system-out>"
printf "ok\n" > compile.status
printf "%s built successfully. (took %ss)\n" "$BUILD_NAME" "${duration}"
+ echo "$BUILD_NAME" >> "$PASSED_BOARDS"
else
junit "<failure type='BuildFailed'>"
junitfile make.log
@@ -368,7 +373,7 @@ function compile_target
printf "failed\n" > compile.status
printf "%s build FAILED after %ss!\nLog excerpt:\n" "$BUILD_NAME" "${duration}"
tail -n $CONTEXT make.log 2> /dev/null || tail -$CONTEXT make.log
- echo "$BUILD_NAME" >> "$FAILED_BOARDS"
+ echo "$BUILD_NAME - Log: ${TOP}/${build_dir}/make.log" >> "$FAILED_BOARDS"
failed=1
fi
cd "$CURR" || return $?
@@ -440,11 +445,10 @@ function build_config
tail -n $CONTEXT "$build_dir/config.log" 2> /dev/null || tail -$CONTEXT "$build_dir/config.log"
junit "</testcase>"
- echo "$BUILD_NAME" >> "$FAILED_BOARDS"
+ echo "$BUILD_NAME - Log: ${TOP}/$build_dir/config.log" >> "$FAILED_BOARDS"
return
fi
-
required_arches=$(egrep "^CONFIG_ARCH_(BOOTBLOCK|R.MSTAGE|VERSTAGE)" "$TARGET/${BUILD_NAME}/config.build" | \
sed "s,^CONFIG_ARCH_[^_]*_\([^=]*\)=.*$,\1," |sort -u |tr 'A-Z\n\r' 'a-z ')
# shellcheck disable=SC2016,SC2059
@@ -718,9 +722,10 @@ if [ "$customizing" = "" ]; then
fi
FAILED_BOARDS="$TOP/$TARGET/failed_boards"
+PASSED_BOARDS="$TOP/$TARGET/passing_boards"
if [ "$recursive" = "false" ]; then
- rm -f "$FAILED_BOARDS"
+ rm -f "$FAILED_BOARDS" "$PASSED_BOARDS"
fi
USE_XARGS=0
@@ -788,9 +793,7 @@ build_targets()
junitfile "$TARGET/sharedutils/make.log"
junit "</failure>"
junit "</testcase>"
- return
- fi
- if [ $ret -eq 1 ]; then
+ echo "Shared Utilities - Log: ${TOP}/$TARGET/sharedutils/make.log" >> "$FAILED_BOARDS"
return
fi
@@ -847,12 +850,13 @@ junit '</testsuite>'
if [ "$recursive" = "false" ]; then
- # Print the list of failed boards
+ # Print the list of failed configurations
if [ -f "$FAILED_BOARDS" ]; then
- printf "%s build(s) failed:\n" "$( wc -l < "$FAILED_BOARDS" )"
+ printf "%s configuration(s) failed:\n" "$( wc -l < "$FAILED_BOARDS" )"
cat "$FAILED_BOARDS"
+ echo
else
- echo "All tested boards passed."
+ printf "All %s tested configurations passed.\n" "$( wc -l < "$PASSED_BOARDS" )"
fi
fi