diff options
-rwxr-xr-x | tcwg_kernel-build.sh | 52 |
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 ) } |