]> git.ozlabs.org Git - next-scripts/blobdiff - do_build
do_build: suppress another message that changes numbers
[next-scripts] / do_build
index 1b8ee97c0bf6f8cf97c658a29fd6417f5bc44abb..97d8ea05a89cb0e1c258090c69bf3b877d0bc815 100755 (executable)
--- a/do_build
+++ b/do_build
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 tree=
 if [ "$1" ]; then
@@ -6,37 +6,52 @@ if [ "$1" ]; then
        shift
 fi
 
-tools_dir=$(cd $(dirname "$0"); pwd)
-. "$tools_dir/common.sh"
+# shellcheck source=common.sh
+. "$(dirname "$0")/common.sh"
 
 set -e
 
 bparent=$(dirname "$build_dir")
 
-line="$(tail -n 1 $SHA1_FILE)"
+line=$(tail -n 1 "$SHA1_FILE")
 
 # strip everything after the first tab character
 stree=${line%% *}
 if [ "$tree" ]; then
-       [ "$tree" = "$stree" ] || {
-               echo "That is not the last tree merged ($tree v $stree)" 1>&2
+       if [ "$tree" != "$stree" ]; then
+               printf 'That is not the last tree merged (%s v %s)\n' "$tree" "$stree" 1>&2
                exit 1
-       }
+       fi
 else
        tree="$stree"
 fi
 obdir="$bparent/old/$tree"
 
 cmd="/bin/sh"
-[ "$build_host" ] &&
+if [ "$build_host" ]; then
        cmd="ssh root@$build_host unshare -n su $(id -u -n)"
+fi
+
+log_regex='/^[[:space:]]+$/d
+/^[.[:digit:]]+user [.[:digit:]]+system [:.[:digit:]]+elapsed [[:digit:]]+%CPU \([[:digit:]]+avgtext\+[[:digit:]]+avgdata [[:digit:]]+maxresident\)k$/d
+/^[[:digit:]]+inputs\+[[:digit:]]+outputs \([[:digit:]]+major\+[[:digit:]]+minor\)pagefaults [[:digit:]]+swaps$/d
+/^Setup is [[:digit:]]+ bytes \(padded to [[:digit:]]+ bytes\)\.$/d
+/^System is [[:digit:]]+ kB$/d
+/^CRC [[:xdigit:]]+$/d
+/^Kernel: arch\/x86\/boot\/bzImage is ready  \(#[[:digit:]]+\)$/d
+/^WARNING: vmlinux\.o\(\.text\+0x[[:xdigit:]]+\): Section mismatch in reference from /d
+/^WARNING: drivers\/built-in\.o\(\.text\+0x[[:xdigit:]]+\): Section mismatch in reference from /d
+/^Warning: Kernel ABI header at /d
+/^[[:space:]]+PERF_VERSION = /d
+s/^(Parsed description of) [[:digit:]]+ (helper function)/\1 X \2/
+s/^([[:xdigit:]]+)([[:space:]]+R_PPC64_(ADDR64|REL32)[[:space:]].*)$/XXX\2/'
 
 $cmd <<-EOF
 
        echo Building on \$(hostname)
 
        echo \$PATH | grep -q "\$HOME/bin" || export PATH="\$HOME/bin:\$PATH"
-       export LANG=C KCFLAGS="-Wimplicit-fallthrough"
+       export LANG=C
 
        cd "$build_dir" || exit 1
 
@@ -49,19 +64,7 @@ $cmd <<-EOF
        [ -d "$obdir" ] || mkdir -p "$obdir" || exit 1
 
        sanitise_log() {
-               sed -r '
-/^[[:space:]]+$/d
-/^[.[:digit:]]+user [.[:digit:]]+system [:.[:digit:]]+elapsed [[:digit:]]+%CPU \([[:digit:]]+avgtext\+[[:digit:]]+avgdata [[:digit:]]+maxresident\)k$/d
-/^[[:digit:]]+inputs\+[[:digit:]]+outputs \([[:digit:]]+major\+[[:digit:]]+minor\)pagefaults [[:digit:]]+swaps$/d
-/^Setup is [[:digit:]]+ bytes \(padded to [[:digit:]]+ bytes\)\.$/d
-/^System is [[:digit:]]+ kB$/d
-/^CRC [[:xdigit:]]+$/d
-/^Kernel: arch\/x86\/boot\/bzImage is ready  \(#[[:digit:]]+\)$/d
-/^WARNING: vmlinux\.o\(\.text\+0x[[:xdigit:]]+\): Section mismatch in reference from /d
-/^WARNING: drivers\/built-in\.o\(\.text\+0x[[:xdigit:]]+\): Section mismatch in reference from /d
-/^Warning: Kernel ABI header at /d
-/^[[:space:]]+PERF_VERSION = /d
-' | grep -vxFf $bparent/log-ignore
+               sed -E -e '$log_regex' | grep -vxFf $bparent/log-ignore
        }
 
        show_log() {