summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-09-22 10:34:36 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-09-23 12:38:01 +0000
commit4af0ea66d04250a0fe96427d387112492994574e (patch)
treefa77f80e549662240e41d91dae47944e912a6485
parentb22d3a7efe9f11279cc5b060893f5a8397f12749 (diff)
tcwg_kernel-build.sh (no_regression_p): Simplify, use no_build_regression_p
Change-Id: I103fe5f44dc483be2279858e8a54f417d7f5831e
-rwxr-xr-xtcwg_kernel-build.sh52
1 files changed, 18 insertions, 34 deletions
diff --git a/tcwg_kernel-build.sh b/tcwg_kernel-build.sh
index e0d0541a..42ed4a55 100755
--- a/tcwg_kernel-build.sh
+++ b/tcwg_kernel-build.sh
@@ -237,42 +237,26 @@ no_regression_p ()
base_linux_n_obj=$(grep -v "^#" $ref_artifacts/results | tail -n1)
fi
- # In log scan for errors below
- # - sed -e 's/"[^"]*"//g' -- removes quoted "error: app diagnostics" strings
- # - " error:" detects compiler errors from GCC and Clang (including GCC ICEs)
- # - "^ERROR:" detects linker errors
- # - ": undefined reference" detects missing symbols during linking
- # - "] Error " detects GNU make errors
- # Then grep for "grep" to exclude other uses of this search.
- # shellcheck disable=SC2154
- # (defined by init_step in jenkins-helpers)
- cat > $run_step_artifacts/results.regressions <<EOF
-# First few build errors in logs:
-$(cat $new_artifacts/console.log | sed -e 's/"[^"]*"//g' | grep " error:\|^ERROR:\|: undefined reference\|\] Error " | grep -v "grep" | head | sed -e "s/^/# /")
-EOF
-
+ local res=""
case "$linux_n_obj:$base_linux_n_obj" in
- boot:*) return 0 ;;
- *:boot) return 1 ;;
- all:*) return 0 ;;
- *:all) return 1 ;;
- *)
- if ! [ "$linux_n_obj" -ge "-10" ]; then
- # Something is very wrong with result (e.g., it's not a number).
- return 1
- fi
- if ! [ "$base_linux_n_obj" -ge "-10" ]; then
- # Something is very wrong with result (e.g., it's not a number).
- return 0
- fi
-
- if [ $linux_n_obj -ge $base_linux_n_obj ]; then
- return 0
- else
- return 1
- fi
- ;;
+ boot:*) res=0 ;;
+ *:boot) res=1 ;;
+ all:*) res=0 ;;
+ *:all) res=1 ;;
esac
+
+ if [ x"$res" != x"0" ]; then
+ local build_res
+
+ no_build_regression_p "$@" &
+ build_res=0 && wait $! || build_res=$?
+
+ if [ x"$res" = x"" ]; then
+ res=$build_res
+ fi
+ fi
+
+ return $res
)
}