summaryrefslogtreecommitdiff
path: root/abe-bisect-helper.sh
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2016-11-30 23:36:15 +0100
committerChristophe Lyon <christophe.lyon@linaro.org>2016-12-15 14:34:01 +0000
commit03448c9933c9dca5433ca5f595246793e332e13b (patch)
tree14ca36fab9c07ac59571364b8f1c495a0d402790 /abe-bisect-helper.sh
parent79095ee7cba38beac64a1dcfa67a8ff1b7313e23 (diff)
abe-bisect.sh abe-bisect-helper.sh: New scripts.
This pair of scripts helps bisecting a regression in GCC (master branch) using ABE. Change-Id: Iea54df1d5038eb3f570a9f387990118cd3ac7d92
Diffstat (limited to 'abe-bisect-helper.sh')
-rwxr-xr-xabe-bisect-helper.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/abe-bisect-helper.sh b/abe-bisect-helper.sh
new file mode 100755
index 00000000..b42d3dc8
--- /dev/null
+++ b/abe-bisect-helper.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+# This script is a helper to bisect GCC regressions.
+# Inputs (as env. variables):
+# EXP: name of .exp file to run
+# TESTNAME: name of test to run
+# TARGET
+# CPU
+# FPU
+# MODE
+# SIMU
+# TARGETBOARD: additional test flags
+
+# Check if the variable NAME is set
+check_set()
+{
+ name=$1
+ eval val=\$${name}
+ [ x$val = x ] && echo $1 not set && exit 1
+}
+
+check_set EXP
+check_set TESTNAME
+check_set TARGET
+#check_set CPU
+#check_set FPU
+#check_set MODE
+#check_set SIMU
+
+REV=$(git show --format=%H -s BISECT_HEAD)
+echo AT `date` BISECT TRYING: ${REV}
+
+set -x
+cd ${RUNDIR}
+
+${ABE}/abe.sh --target ${TARGET} gcc=gcc.git@${REV} --set runtestflags="${EXP}=${TESTNAME}" --build all --check gcc --excludecheck gdb
+[ $? -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