<p>Martin Roth has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20359">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">util/abuild: Update abuild<br><br>- Improve logging<br>- Add location of logfiles to failed board log.<br>- Log when the shared utilities fail to build.<br>- Log passing configs and print count of tested configs that passed.<br>- Disable a couple of shellcheck warnings.<br>- Remove some unused code.<br><br>Change-Id: Ic2cf1c0a5f123d759aac7ce55092ad71314a8c9d<br>Signed-off-by: Martin Roth <martinroth@google.com><br>---<br>M util/abuild/abuild<br>1 file changed, 14 insertions(+), 10 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/20359/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/util/abuild/abuild b/util/abuild/abuild<br>index 6473fcf..6591edf 100755<br>--- a/util/abuild/abuild<br>+++ b/util/abuild/abuild<br>@@ -274,9 +274,13 @@<br>        # shellcheck disable=SC2059<br>   printf "$configoptions" >> "${config_file}"<br> <br>+     # shellcheck disable=SC2086<br>+  # Disabling SC2086 for "$silent" only<br>       yes "" 2>/dev/null | $MAKE oldconfig $silent "DOTCONFIG=${config_file}" "obj=${build_dir}" "objutil=$TARGET/sharedutils" &> "${build_dir}/config.log" ; \<br>                 CONFIG_OK=$?<br>  if [ $CONFIG_OK -eq 0 ]; then<br>+                # shellcheck disable=SC2086<br>+          # Disabling SC2086 for "$silent" only<br>               $MAKE savedefconfig $silent DEFCONFIG="${defconfig_file}" DOTCONFIG="${config_file}" obj="${build_dir}" objutil="$TARGET/sharedutils" &>> "${build_dir}/config.log"<br>               return $?<br>     else<br>@@ -361,6 +365,7 @@<br>             junit "</system-out>"<br>                 printf "ok\n" > compile.status<br>           printf "%s built successfully. (took %ss)\n" "$BUILD_NAME" "${duration}"<br>+               echo "$BUILD_NAME" >> "$PASSED_BOARDS"<br>      else<br>          junit "<failure type='BuildFailed'>"<br>          junitfile make.log<br>@@ -368,7 +373,7 @@<br>               printf "failed\n" > compile.status<br>               printf "%s build FAILED after %ss!\nLog excerpt:\n" "$BUILD_NAME" "${duration}"<br>                 tail -n $CONTEXT make.log 2> /dev/null || tail -$CONTEXT make.log<br>-         echo "$BUILD_NAME" >> "$FAILED_BOARDS"<br>+             echo "$BUILD_NAME - Log: ${TOP}/${build_dir}/make.log" >> "$FAILED_BOARDS"<br>          failed=1<br>      fi<br>    cd "$CURR" || return $?<br>@@ -440,10 +445,9 @@<br>               tail -n $CONTEXT "$build_dir/config.log" 2> /dev/null || tail -$CONTEXT "$build_dir/config.log"<br> <br>             junit "</testcase>"<br>-          echo "$BUILD_NAME" >> "$FAILED_BOARDS"<br>+             echo "$BUILD_NAME - Log: ${TOP}/$build_dir/config.log" >> "$FAILED_BOARDS"<br>          return<br>        fi<br>-<br> <br>      required_arches=$(egrep "^CONFIG_ARCH_(BOOTBLOCK|R.MSTAGE|VERSTAGE)" "$TARGET/${BUILD_NAME}/config.build" | \<br>                     sed "s,^CONFIG_ARCH_[^_]*_\([^=]*\)=.*$,\1," |sort -u |tr 'A-Z\n\r' 'a-z  ')<br>@@ -718,9 +722,10 @@<br> fi<br> <br> FAILED_BOARDS="$TOP/$TARGET/failed_boards"<br>+PASSED_BOARDS="$TOP/$TARGET/passing_boards"<br> <br> if [ "$recursive" = "false" ]; then<br>-     rm -f "$FAILED_BOARDS"<br>+     rm -f "$FAILED_BOARDS" "$PASSED_BOARDS"<br> fi<br> <br> USE_XARGS=0<br>@@ -788,9 +793,7 @@<br>                junitfile "$TARGET/sharedutils/make.log"<br>            junit "</failure>"<br>            junit "</testcase>"<br>-          return<br>-       fi<br>-   if [ $ret -eq 1 ]; then<br>+              echo "Shared Utilities - Log: ${TOP}/$TARGET/sharedutils/make.log" >> "$FAILED_BOARDS"<br>              return<br>        fi<br> <br>@@ -847,12 +850,13 @@<br> <br> if [ "$recursive" = "false" ]; then<br> <br>- # Print the list of failed boards<br>+    # Print the list of failed configurations<br>     if [ -f "$FAILED_BOARDS" ]; then<br>-           printf "%s build(s) failed:\n" "$( wc -l < "$FAILED_BOARDS" )"<br>+              printf "%s configuration(s) failed:\n" "$( wc -l < "$FAILED_BOARDS" )"<br>               cat "$FAILED_BOARDS"<br>+               echo<br>  else<br>-         echo "All tested boards passed."<br>+           printf "All %s tested configurations passed.\n" "$( wc -l < "$PASSED_BOARDS" )"<br>      fi<br> fi<br> <br></pre><p>To view, visit <a href="https://review.coreboot.org/20359">change 20359</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/20359"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ic2cf1c0a5f123d759aac7ce55092ad71314a8c9d </div>
<div style="display:none"> Gerrit-Change-Number: 20359 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Martin Roth <martinroth@google.com> </div>