summaryrefslogtreecommitdiff
path: root/abe-bisect.sh
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2020-01-15 09:38:12 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2020-01-15 09:43:10 +0000
commit42e99f8d0d715ab727e6efbab9cc5486d0d4a739 (patch)
tree7b93ff03b1c495dcde094fd4d13cea6cf4f29300 /abe-bisect.sh
parentaa64572b879c27de1948f7c3582b21c5eadf52c0 (diff)
abe-bisect.sh: Add support for good and bad revs as git revs
Change-Id: I749847cbbef25edf5a27541d15c698e7c0311c4c
Diffstat (limited to 'abe-bisect.sh')
-rwxr-xr-xabe-bisect.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/abe-bisect.sh b/abe-bisect.sh
index 6e57e507..347cd304 100755
--- a/abe-bisect.sh
+++ b/abe-bisect.sh
@@ -5,8 +5,8 @@ set -x
# Inputs (as env. variables):
# EXP: name of .exp file to run
# TESTNAME: name of test to run
-# GOOD
-# BAD
+# GOOD (svn) or GOODGIT (git)
+# BAD (svn) or (BADGIT) (git)
# TARGET
# CPU
# FPU
@@ -63,8 +63,13 @@ git reset --hard
git pull
git bisect start --no-checkout
-GOODSHA1=`git log --format=format:"%H" --grep=trunk@${GOOD} master`
-BADSHA1=`git log --format=format:"%H" --grep=trunk@${BAD} master`
+# GIT revisions take precedence over SVN ones (normally one should
+# provide either SVN revs or GIT revs, not both
+[ "x$GOOD" != "x" ] && GOODSHA1=`git log --format=format:"%H" --grep=trunk@${GOOD} master`
+[ "x$BAD" != "x" ] && BADSHA1=`git log --format=format:"%H" --grep=trunk@${BAD} master`
+
+[ "x$GOODGIT" != "x" ] && GOODSHA1=`git log --format=format:"%H" -n1 ${GOODGIT}`
+[ "x$BADGIT" != "x" ] && BADSHA1=`git log --format=format:"%H" -n1 ${BADGIT}`
echo GOOD: $GOODSHA1
echo BAD: $BADSHA1