summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2020-02-14 13:45:57 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2020-02-18 14:12:27 +0000
commitba03ff8ab02f3754c40c2eefff21bdd5b3fee1bc (patch)
treef1cd8b7b94dcfdcfc552ecc7bed38c127ea2445b
parentb8d32cdee5ac1f71f84c5abf86708ad5cca8fbd3 (diff)
Round-robin scripts: improve regression email contents
When a regression occurs after the build phase, don't include harmless errors from the the build stage, and provide info from the test phase. Change-Id: I75ce76e81ecbda4492bb49e7d765c25cac599f12
-rwxr-xr-xround-robin-bisect.sh13
-rw-r--r--round-robin.sh11
-rwxr-xr-xtcwg_bmk-build.sh17
-rwxr-xr-xtcwg_gnu-build.sh2
-rwxr-xr-xtcwg_kernel-build.sh11
5 files changed, 37 insertions, 17 deletions
diff --git a/round-robin-bisect.sh b/round-robin-bisect.sh
index ff027257..7f67484d 100755
--- a/round-robin-bisect.sh
+++ b/round-robin-bisect.sh
@@ -495,16 +495,9 @@ Could not identify regression in *$current_project* in CI configuration ${rr[ci_
EOF
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
-cat >> $artifacts/jenkins/mail-body.txt <<EOF
-First few errors in logs of $bad_name:
-$(cat $artifacts/build-$bad_sha1/console.log | sed -e 's/"[^"]*"//g' | grep " error:\|^ERROR:\|: undefined reference\|\] Error " | head)
-EOF
+# Include error logs
+cat $artifacts/build-$bad_sha1/regressions.txt | tee -a $artifacts/jenkins/mail-body.txt
+
if [ x"${JIRA_PASSWORD+set}" = x"set" -a -f $artifacts/first-bad ]; then
case "${rr[ci_project]}/${rr[ci_config]}" in
diff --git a/round-robin.sh b/round-robin.sh
index c468d6ac..f91109bf 100644
--- a/round-robin.sh
+++ b/round-robin.sh
@@ -480,6 +480,17 @@ no_build_regression_p ()
build_result_ref=$(tail -n1 $ref_artifacts/results)
build_result_new=$(tail -n1 $new_artifacts/results)
+ # 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
+ cat > $new_artifacts/regressions.txt <<EOF
+First few build errors in logs:
+$(cat $new_artifacts/console.log | sed -e 's/"[^"]*"//g' | grep " error:\|^ERROR:\|: undefined reference\|\] Error " | head)
+EOF
+
if [ $build_result_new -lt $build_result_ref ]; then
return 1
fi
diff --git a/tcwg_bmk-build.sh b/tcwg_bmk-build.sh
index 66348f0a..c962d122 100755
--- a/tcwg_bmk-build.sh
+++ b/tcwg_bmk-build.sh
@@ -317,6 +317,9 @@ no_regression_vs_p ()
(
set -euf -o pipefail
+ local ref_artifacts=$1
+ local new_artifacts=$2
+
# Check for build and correctness regressions.
no_build_regression_p "$@"
@@ -328,19 +331,19 @@ no_regression_vs_p ()
# base-artifacts/, but it could have been generated with an older version
# of scripts, so it's safer and more resilient to re-generate it from original
# perf data.
- if ! [ -f "$1/results_id-1" -a -f "$1/results_id-2" ]; then
+ if ! [ -f "$ref_artifacts/results_id-1" -a -f "$ref_artifacts/results_id-2" ]; then
return 0
fi
- compare_results "$1/results_id-1" "$1/results_id-2" "--num_dsos 1 --num_symbols 0"
+ compare_results "$ref_artifacts/results_id-1" "$ref_artifacts/results_id-2" "--num_dsos 1 --num_symbols 0"
for i in $(find $run_step_artifacts/ -type f -name "results*"); do
mv $i $(dirname $i)/ref-$(basename $i)
done
# Similarly, generate new-results-compare.csv.
- if ! [ -f "$2/results_id-1" -a -f "$2/results_id-2" ]; then
+ if ! [ -f "$new_artifacts/results_id-1" -a -f "$new_artifacts/results_id-2" ]; then
return 1
fi
- compare_results "$2/results_id-1" "$2/results_id-2" "--num_dsos 1 --num_symbols 0"
+ compare_results "$new_artifacts/results_id-1" "$new_artifacts/results_id-2" "--num_dsos 1 --num_symbols 0"
for i in $(find $run_step_artifacts/ -type f -name "results*"); do
mv $i $(dirname $i)/new-$(basename $i)
done
@@ -372,12 +375,13 @@ no_regression_vs_p ()
# a regression.
status=0
prev_bmk=""
+ echo "" > $new_artifacts/regressions.txt
while IFS=, read -a arr; do
bmk=${arr[0]}
symbol=${arr[1]}
result=${arr[2]}
if ! [ "$result" -le "5000" ]; then
- echo "Regression in $bmk,$symbol"
+ echo "Regression in $bmk,$symbol" | tee -a $new_artifacts/regressions.txt
status=1
if [ x"$bmk" != x"$prev_bmk" ]; then
bisect_bmks+=("++benchmarks" "$bmk")
@@ -419,9 +423,10 @@ no_regression_to_base_p ()
# a regression.
status=0
prev_bmk=""
+ echo "" > $new_artifacts/regressions.txt
while IFS=, read -r bmk symbol result; do
if ! [ "$result" -le "50" ]; then
- echo "Regression in $bmk,$symbol"
+ echo "Regression in $bmk,$symbol" | tee -a $new_artifacts/regressions.txt
status=1
if [ x"$bmk" != x"$prev_bmk" ]; then
bisect_bmks+=("++benchmarks" "$bmk")
diff --git a/tcwg_gnu-build.sh b/tcwg_gnu-build.sh
index de63badd..a176c337 100755
--- a/tcwg_gnu-build.sh
+++ b/tcwg_gnu-build.sh
@@ -102,7 +102,7 @@ no_regression_p ()
fi
local res
- gcc/contrib/compare_tests $sumfiles_base $sumfiles_new &
+ gcc/contrib/compare_tests $sumfiles_base $sumfiles_new | tee $new_artifacts/regressions.txt &
res=0 && wait $! || res=$?
if [ $res -ne 0 ]; then
diff --git a/tcwg_kernel-build.sh b/tcwg_kernel-build.sh
index 7de64f3f..f23bae86 100755
--- a/tcwg_kernel-build.sh
+++ b/tcwg_kernel-build.sh
@@ -223,6 +223,17 @@ no_regression_p ()
base_linux_n_obj=$(tail -n1 $ref_artifacts/results)
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
+ cat > $new_artifacts/regressions.txt <<EOF
+First few build errors in logs:
+$(cat $new_artifacts/console.log | sed -e 's/"[^"]*"//g' | grep " error:\|^ERROR:\|: undefined reference\|\] Error " | head)
+EOF
+
case "$linux_n_obj:$base_linux_n_obj" in
boot:*) return 0 ;;
*:boot) return 1 ;;