diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2016-11-30 23:36:15 +0100 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2016-12-15 14:34:01 +0000 |
commit | 03448c9933c9dca5433ca5f595246793e332e13b (patch) | |
tree | 14ca36fab9c07ac59571364b8f1c495a0d402790 /abe-bisect.sh | |
parent | 79095ee7cba38beac64a1dcfa67a8ff1b7313e23 (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.sh')
-rwxr-xr-x | abe-bisect.sh | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/abe-bisect.sh b/abe-bisect.sh new file mode 100755 index 00000000..7a08a49c --- /dev/null +++ b/abe-bisect.sh @@ -0,0 +1,66 @@ +#!/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 +# GOOD +# BAD +# TARGET +# CPU +# FPU +# MODE +# SIMU +# TARGETBOARD: additional test flags + +# Sample usage: +# EXP=advsimd-intrinsics.exp TESTNAME=vduph_lane.c TARGET=aarch64-linux-gnu GOOD=242941 BAD=242954 ./abe-bisect.sh + +# 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 GOOD +check_set BAD +check_set TARGET +#check_set CPU +#check_set FPU +#check_set MODE +#check_set SIMU +#check_set TARGETBOARD + +rundir=`pwd -P` +mydir="$(dirname $0)" +cd "${mydir}" +mydir="$(pwd)" +cd ${rundir} + +git clone http://git.linaro.org/toolchain/abe.git +ABE=${rundir}/abe +${ABE}/configure --with-git-reference-dir /home/tcwg-buildslave/snapshots-ref + +# Checkout GCC master +${ABE}/abe.sh --target $TARGET gcc=gcc.git~master --checkout all + +cd snapshots/gcc.git~master + +git bisect reset +git reset --hard +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` + +echo GOOD: $GOODSHA1 +echo BAD: $BADSHA1 + +git bisect good ${GOODSHA1} +git bisect bad ${BADSHA1} + +RUNDIR=${rundir} ABE=${ABE} EXP=${EXP} TESTNAME=${TESTNAME} TARGET=${TARGET} CPU=${CPU} FPU=${FPU} MODE=${MODE} SIMU=${SIMU} TARGETBOARD=${TARGETBOARD} git bisect run ${mydir}/abe-bisect-helper.sh |