diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2020-05-04 10:57:46 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2020-05-04 10:57:46 +0000 |
commit | e5712005c171f9813cb02f9014f8feb850893c2c (patch) | |
tree | 45148cabc9cc6f332197c080e589d6023b9e1731 /abe-bisect.sh | |
parent | 76d9d1354e90b2fc9474d1c140b60b248a30aaf4 (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.sh')
-rwxr-xr-x | abe-bisect.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/abe-bisect.sh b/abe-bisect.sh index 69607914..0a227d8c 100755 --- a/abe-bisect.sh +++ b/abe-bisect.sh @@ -105,8 +105,8 @@ if [ $? -ne 0 ]; then fi sums=`find builds/*/${TARGET}/gcc.git~master_rev_${GOODSHA1}-stage2/ -name "*.sum"` -good_nb_fail=$(grep -wc FAIL $sums) -good_nb_pass=$(grep -wc PASS $sums) +good_nb_fail=$(cat $sums | grep -wc FAIL) +good_nb_pass=$(cat $sums | grep -wc PASS) ${ABE}/abe.sh --target ${TARGET} \ gcc=gcc.git@${BADSHA1} \ @@ -121,8 +121,8 @@ if [ $? -ne 0 ]; then fi sums=`find builds/*/${TARGET}/gcc.git~master_rev_${BADSHA1}-stage2/ -name "*.sum"` -bad_nb_fail=$(grep -wc FAIL $sums) -bad_nb_pass=$(grep -wc PASS $sums) +bad_nb_fail=$(cat $sums | grep -wc FAIL) +bad_nb_pass=$(cat $sums | grep -wc PASS) # make sure BAD has more failures than GOOD if [ $bad_nb_fail -le $good_nb_fail ]; then |