aboutsummaryrefslogtreecommitdiff
path: root/util/abuild
diff options
context:
space:
mode:
authorMartin Roth <gaumless@gmail.com>2023-10-31 20:39:30 -0600
committerMartin L Roth <gaumless@gmail.com>2023-11-07 18:03:31 +0000
commita49e7b974d8a10642bc820eefdaa26c5b5b898f5 (patch)
treea6b2ce34ed527edcf500e493d86602283d135e6f /util/abuild
parentacbc4912375085a099c2427def464d6e481f2a90 (diff)
util/abuild: Add all builds to junit.xml files
The builds from the configs directory were not being saved in the junit.xml files that Jenkins uses to determine pass vs fail of the individual builds. This also fixes the path to a log file that I noticed while testing. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I37dbee676cc9e507e612ce66994a04aba062757a Reviewed-on: https://review.coreboot.org/c/coreboot/+/78863 Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util/abuild')
-rwxr-xr-xutil/abuild/abuild23
1 files changed, 17 insertions, 6 deletions
diff --git a/util/abuild/abuild b/util/abuild/abuild
index 0e7e97b242..4bdf7ee6bc 100755
--- a/util/abuild/abuild
+++ b/util/abuild/abuild
@@ -11,8 +11,8 @@
#set -x # Turn echo on....
-ABUILD_DATE="Feb 3, 2023"
-ABUILD_VERSION="0.11.01"
+ABUILD_DATE="Nov 1, 2023"
+ABUILD_VERSION="0.11.02"
TOP=$PWD
@@ -561,7 +561,7 @@ function build_config
tail -n $CONTEXT "$build_dir/config.log" 2> /dev/null || tail -$CONTEXT "$build_dir/config.log"
junit "</testcase>"
- echo "$BUILD_NAME - Log: ${TOP}/$build_dir/config.log" >> "$FAILED_BOARDS"
+ echo "$BUILD_NAME - Log: $build_dir/config.log" >> "$FAILED_BOARDS"
return
fi
@@ -607,6 +607,18 @@ EOF
junit "</testcase>"
}
+function record_mainboard
+{
+ local log=$1
+
+ if test "$mode" != "text" && test -f "$TARGET/abuild/${log}.xml"; then
+ cat "$TARGET/abuild/${log}.xml" >> "$REAL_XMLFILE"
+ echo "$TARGET/abuild/${log}.xml written to $REAL_XMLFILE" >&2
+ else
+ echo "Warning: $TARGET/abuild/${log}.xml not found." >&2
+ fi
+}
+
# One target may build several configs
function build_target
{
@@ -630,6 +642,7 @@ function build_target
echo "Building config $BUILD_NAME"
build_dir=$TARGET/${BUILD_NAME}
build_config "$MAINBOARD" "$build_dir" "$BUILD_NAME" "$config"
+ record_mainboard "$BUILD_NAME"
remove_target "$BUILD_NAME"
done
fi
@@ -637,6 +650,7 @@ function build_target
echo "Building board $MAINBOARD (using default config)"
build_dir=$TARGET/${MAINBOARD}
build_config "$MAINBOARD" "$build_dir" "$MAINBOARD"
+ record_mainboard "$MAINBOARD"
remove_target "$MAINBOARD"
}
@@ -1043,9 +1057,6 @@ if [ "$target" != "" ]; then
exit 1
else
build_target "${MAINBOARD}"
- test "$mode" != "text" && \
- test -f "$TARGET/abuild/${MAINBOARD}.xml" && \
- cat "$TARGET/abuild/${MAINBOARD}.xml" >> "$REAL_XMLFILE"
XMLFILE=$REAL_XMLFILE
fi
else