summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2020-04-30 14:27:44 +0100
committerDavid Spickett <david.spickett@linaro.org>2020-04-30 14:32:18 +0100
commit76d9d1354e90b2fc9474d1c140b60b248a30aaf4 (patch)
treea821f5128ff18964039fce96348c1798221348e0
parentb687c959bda4ad66a6ea330682ba8e1745ff38b7 (diff)
round-robin.sh/tcwg_kernel-build.sh
When looking for errors, exclude other uses of grep looking for errors. Without this we get job names with the entire grep line in the title. We could still get spurious names if there were no error lines found, but at least they'll be shorter. Change-Id: Iceb0279dff2bb51ff59977efaf3f0d523c91ce7c
-rw-r--r--round-robin.sh3
-rwxr-xr-xtcwg_kernel-build.sh3
2 files changed, 4 insertions, 2 deletions
diff --git a/round-robin.sh b/round-robin.sh
index abd3b680..753c2824 100644
--- a/round-robin.sh
+++ b/round-robin.sh
@@ -502,9 +502,10 @@ no_build_regression_p ()
# - "^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.
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 " | head | sed -e "s/^/# /")
+$(cat $new_artifacts/console.log | sed -e 's/"[^"]*"//g' | grep " error:\|^ERROR:\|: undefined reference\|\] Error " | grep -v "grep" | head | sed -e "s/^/# /")
EOF
return 1
fi
diff --git a/tcwg_kernel-build.sh b/tcwg_kernel-build.sh
index 14c24489..1099e87c 100755
--- a/tcwg_kernel-build.sh
+++ b/tcwg_kernel-build.sh
@@ -251,11 +251,12 @@ no_regression_p ()
# - "^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 " | head | sed -e "s/^/# /")
+$(cat $new_artifacts/console.log | sed -e 's/"[^"]*"//g' | grep " error:\|^ERROR:\|: undefined reference\|\] Error " | grep -v "grep" | head | sed -e "s/^/# /")
EOF
case "$linux_n_obj:$base_linux_n_obj" in