summaryrefslogtreecommitdiff
path: root/abe-bisect-helper.sh
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2020-05-04 10:57:46 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2020-05-04 10:57:46 +0000
commite5712005c171f9813cb02f9014f8feb850893c2c (patch)
tree45148cabc9cc6f332197c080e589d6023b9e1731 /abe-bisect-helper.sh
parent76d9d1354e90b2fc9474d1c140b60b248a30aaf4 (diff)
abe-bisect*: Fix grep invocations
A previous shellcheck cleanup patch broke the grep -w XXX *.YYY | wc -l commands because grep -wc XXX *.YYY also reports the names of the files scanned by grep. We want only the total number of matches, so we switch to: cat *.YYY | grep -wc XXX Change-Id: I64c54011042d8870e484ab81d24a5ff49b6163d5
Diffstat (limited to 'abe-bisect-helper.sh')
-rwxr-xr-xabe-bisect-helper.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/abe-bisect-helper.sh b/abe-bisect-helper.sh
index 50605a66..328fbe9f 100755
--- a/abe-bisect-helper.sh
+++ b/abe-bisect-helper.sh
@@ -57,10 +57,10 @@ ${ABE}/abe.sh --target ${TARGET} \
[ $? -ne 0 ] && exit 125
sums=`find builds/*/${TARGET}/gcc.git~master_rev_${REV}-stage2/ -name "*.sum"`
-nb_fail=$(grep -wc FAIL $sums)
+nb_fail=$(cat $sums | grep -wc FAIL)
[ ${nb_fail} -gt ${GOODFAIL} ] && exit 1 # More failures than GOOD, this is a bad one
-nb_pass=$(grep -wc PASS $sums)
+nb_pass=$(cat $sums | grep -wc PASS)
[ ${nb_pass} -ge ${GOODPASS} ] && exit 0 # At least as many passes as GOOD, this is a good one
exit 125 # something went wrong