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>
This commit is contained in:
parent
edd591d8ca
commit
d16022bdd4
|
@ -274,9 +274,13 @@ function update_config
|
||||||
# shellcheck disable=SC2059
|
# shellcheck disable=SC2059
|
||||||
printf "$configoptions" >> "${config_file}"
|
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" ; \
|
yes "" 2>/dev/null | $MAKE oldconfig $silent "DOTCONFIG=${config_file}" "obj=${build_dir}" "objutil=$TARGET/sharedutils" &> "${build_dir}/config.log" ; \
|
||||||
CONFIG_OK=$?
|
CONFIG_OK=$?
|
||||||
if [ $CONFIG_OK -eq 0 ]; then
|
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"
|
$MAKE savedefconfig $silent DEFCONFIG="${defconfig_file}" DOTCONFIG="${config_file}" obj="${build_dir}" objutil="$TARGET/sharedutils" &>> "${build_dir}/config.log"
|
||||||
return $?
|
return $?
|
||||||
else
|
else
|
||||||
|
@ -361,6 +365,7 @@ function compile_target
|
||||||
junit "</system-out>"
|
junit "</system-out>"
|
||||||
printf "ok\n" > compile.status
|
printf "ok\n" > compile.status
|
||||||
printf "%s built successfully. (took %ss)\n" "$BUILD_NAME" "${duration}"
|
printf "%s built successfully. (took %ss)\n" "$BUILD_NAME" "${duration}"
|
||||||
|
echo "$BUILD_NAME" >> "$PASSED_BOARDS"
|
||||||
else
|
else
|
||||||
junit "<failure type='BuildFailed'>"
|
junit "<failure type='BuildFailed'>"
|
||||||
junitfile make.log
|
junitfile make.log
|
||||||
|
@ -368,7 +373,7 @@ function compile_target
|
||||||
printf "failed\n" > compile.status
|
printf "failed\n" > compile.status
|
||||||
printf "%s build FAILED after %ss!\nLog excerpt:\n" "$BUILD_NAME" "${duration}"
|
printf "%s build FAILED after %ss!\nLog excerpt:\n" "$BUILD_NAME" "${duration}"
|
||||||
tail -n $CONTEXT make.log 2> /dev/null || tail -$CONTEXT make.log
|
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
|
failed=1
|
||||||
fi
|
fi
|
||||||
cd "$CURR" || return $?
|
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"
|
tail -n $CONTEXT "$build_dir/config.log" 2> /dev/null || tail -$CONTEXT "$build_dir/config.log"
|
||||||
|
|
||||||
junit "</testcase>"
|
junit "</testcase>"
|
||||||
echo "$BUILD_NAME" >> "$FAILED_BOARDS"
|
echo "$BUILD_NAME - Log: ${TOP}/$build_dir/config.log" >> "$FAILED_BOARDS"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
required_arches=$(egrep "^CONFIG_ARCH_(BOOTBLOCK|R.MSTAGE|VERSTAGE)" "$TARGET/${BUILD_NAME}/config.build" | \
|
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 ')
|
sed "s,^CONFIG_ARCH_[^_]*_\([^=]*\)=.*$,\1," |sort -u |tr 'A-Z\n\r' 'a-z ')
|
||||||
# shellcheck disable=SC2016,SC2059
|
# shellcheck disable=SC2016,SC2059
|
||||||
|
@ -718,9 +722,10 @@ if [ "$customizing" = "" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FAILED_BOARDS="$TOP/$TARGET/failed_boards"
|
FAILED_BOARDS="$TOP/$TARGET/failed_boards"
|
||||||
|
PASSED_BOARDS="$TOP/$TARGET/passing_boards"
|
||||||
|
|
||||||
if [ "$recursive" = "false" ]; then
|
if [ "$recursive" = "false" ]; then
|
||||||
rm -f "$FAILED_BOARDS"
|
rm -f "$FAILED_BOARDS" "$PASSED_BOARDS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
USE_XARGS=0
|
USE_XARGS=0
|
||||||
|
@ -788,9 +793,7 @@ build_targets()
|
||||||
junitfile "$TARGET/sharedutils/make.log"
|
junitfile "$TARGET/sharedutils/make.log"
|
||||||
junit "</failure>"
|
junit "</failure>"
|
||||||
junit "</testcase>"
|
junit "</testcase>"
|
||||||
return
|
echo "Shared Utilities - Log: ${TOP}/$TARGET/sharedutils/make.log" >> "$FAILED_BOARDS"
|
||||||
fi
|
|
||||||
if [ $ret -eq 1 ]; then
|
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -847,12 +850,13 @@ junit '</testsuite>'
|
||||||
|
|
||||||
if [ "$recursive" = "false" ]; then
|
if [ "$recursive" = "false" ]; then
|
||||||
|
|
||||||
# Print the list of failed boards
|
# Print the list of failed configurations
|
||||||
if [ -f "$FAILED_BOARDS" ]; then
|
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"
|
cat "$FAILED_BOARDS"
|
||||||
|
echo
|
||||||
else
|
else
|
||||||
echo "All tested boards passed."
|
printf "All %s tested configurations passed.\n" "$( wc -l < "$PASSED_BOARDS" )"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue