summaryrefslogtreecommitdiff
path: root/abe-bisect-helper.sh
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2017-10-11 12:25:49 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2017-10-11 12:25:49 +0000
commit1b191231991ae06c1892f2da6a8ce757eeffcdaf (patch)
tree06dbefd24aa76cad439f213515a6fa96f1bcd2e5 /abe-bisect-helper.sh
parent4569ef3df147ccf4bb708d062ba91e6b5c391173 (diff)
abe-bisect-helper.sh: Make use of the number of pass/fail in good.
Consider current commit "good" if it has more passes than GOOD, and "bad" if it has more failures. Change-Id: I76b325e3985699b04dd107c4a39c2315b82bef78
Diffstat (limited to 'abe-bisect-helper.sh')
-rwxr-xr-xabe-bisect-helper.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/abe-bisect-helper.sh b/abe-bisect-helper.sh
index e406c823..983c7232 100755
--- a/abe-bisect-helper.sh
+++ b/abe-bisect-helper.sh
@@ -38,6 +38,10 @@ ${ABE}/abe.sh --target ${TARGET} gcc=gcc.git@${REV} --set runtestflags="${EXP}=$
[ $? -ne 0 ] && exit 125
sums=`find builds/*/${TARGET}/gcc.git~master_rev_${REV}-stage2/ -name "*.sum"`
-grep ${TESTNAME} $sums | grep FAIL && exit 1 # FAILED
-grep ${TESTNAME} $sums | grep PASS && exit 0 # SUCCESS
-exit 125 # If no PASS, something went wrong
+nb_fail=$(grep ${TESTNAME} $sums | grep -c FAIL)
+[ ${nb_fail} -gt ${GOODFAIL} ] && exit 1 # More failures than GOOD, this is a bad one
+
+nb_pass=$(grep ${TESTNAME} $sums | grep -c PASS)
+[ ${nb_pass} -ge ${GOODPASS} ] && exit 0 # At least as many passes as GOOD, this is a good one
+
+exit 125 # something went wrong