summaryrefslogtreecommitdiff
path: root/round-robin-bisect.sh
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2020-02-10 14:10:57 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2020-02-10 15:37:54 +0000
commitefcea26a1132e8a56553ddaaca0db44310f6383f (patch)
tree3126e6ec4692c5d7447691763fb2795ca50c3bf2 /round-robin-bisect.sh
parentbed581c4be7b3dba3afc93a2ffaee6aa74fbc2ff (diff)
Make sure the sources are clean before bisecting
It can happen that some of the source files are modified during a build, which causes 'git bisect' commands to abort. This patch introduces calls 'git reset --hard' after completing a build, as suggested by the 'git bisect' manpage, to avoid this problem. For reference this happened recently in GCC, where gcc/config/arm/arm-tables.opt was modified. That bug has been fixed, but we can still suffer from it while bisecting. Change-Id: Ib9b7c8c7d26a9c7ba1361174fa061f97e3d88843
Diffstat (limited to 'round-robin-bisect.sh')
-rwxr-xr-xround-robin-bisect.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/round-robin-bisect.sh b/round-robin-bisect.sh
index af984147..97cf220e 100755
--- a/round-robin-bisect.sh
+++ b/round-robin-bisect.sh
@@ -92,6 +92,9 @@ cd $current_project
mkdir $artifacts/git-logs
+# Make sure the sources are clean before bisecting
+git reset --hard
+
if [ -f "$replay_log" ]; then
cp "$replay_log" $artifacts/git-logs/bisect_replay.sh
git bisect replay $artifacts/git-logs/bisect_replay.sh
@@ -156,6 +159,8 @@ $build_script \
--verbose "$verbose" &
res=0 && wait \$! || res=\$?
+git reset --hard
+
if [ x"\$res" != x"0" ]; then
if [ -f $rel_artifacts/build-\$rev/trigger-build-$current_project ]; then
exit 1