-
Notifications
You must be signed in to change notification settings - Fork 5
Bisect Search
How to find the commit that broke a certain example:
$ mkdir ~/bisect_search
$ cd ~/bisect_search
$ touch _BISECT_
$ git clone /home/aprove/git/aprove.git
$ vim ~/my_bisect_search
# This directory must be used exclusively for this bisect search and must be
# marked with a file named "_BISECT_"
BISECTDIR=/home/fab/bisect_space/
# the JDKs to try building aprove with (useful for bisect searches in older
# revisions of aprove)
JDKS="/opt/jdk1.6.0_13 /opt/jdk1.5.0_18"
# how we call aprove, you must use '-m wst'
VMARGS="-ea"
APROVEARGS="-m wst -u cli -p none -t 60 /home/fab/example/test.trs"
EXPECTEDRESULT="YES"
Note that the bisect script you call must not be the one in the ~/bisect_search/aprove/bin directory, since this might vanish during the search.
$ cd ~/bisect_search/aprove/
Start the bisect search:
$ git bisect start
Check out a version you that you know is broken and test the bisect script on it.
$ git checkout 1246e3423a341b2...
$ ~/workspace/aprove/bin/bisect.sh ~/my_bisect_search
This should return with the message "BAD" after some time. Mark this commit as broken.
$ git bisect bad
Checkout a good commit and test the script.
$ git checkout 74234ea...
$ ~/workspace/aprove/bin/bisect.sh ~/my_bisect_search
This should return with the message "GOOD". Mark this commit as good.
$ git bisect good
Now let the computer do the rest of the search and have a coffee (or 10).
$ git bisect run ~/workspace/aprove/bin/bisect.sh ~/my_bisect_search