Git Bisect for test-suite regressions
This is based on scripts and workflow from Doug Gilmore as described in bugzilla https://dmz-portal.mips.com/bugz/show_bug.cgi?id=1801
First you need to get the llvm_proeject from github.com https://github.com/chapuni/llvm-project . This git hub has all the source directories for llvm. The clang directory is a top level directory as opposed to being a subdirectory off llvm/tools so to simplify the build process it is necessary to create a symbol link. This will be demonstrated later.
You can clone this git repository from github. The URL is copyable from the lower right hand corner of the web page https://github.com/chapuni/llvm-project . At this time the URL is https://github.com/chapuni/llvm-project.git . so the clone command would be:
git clone https://github.com/chapuni/llvm-project.git
Next you need to create a link to clang in the tools directory.
ln -s ../../clang .
Next you need to check out test-suite
git clone email@example.com:llvm-test-suite.git test-suite
git checkout mips-qemu
What follows are some manual steps.
This git repository that we have just downloaded from github has different commit ids from what is on our local git server.
The idea here is that in our build bots we can see on one day the given test that is failing was passing and on a later day it was failing.
You need to go our build bot page and find the pair of commit ids for this good/bad pair of days. Lets call these goodid, badid.
Next you need to go to a master branch somewhere for our llvm git repository (that is at least as new as the "bad" day
in question) and do a
git log -n 10000 > foo.txt <br> Now edit this foo.txt and find the text corresponding to these commit ids. For an example, one I bisected was:<br> commit 893f22f88245d29487e1fff662ac9e78f86f8e91 Author: Justin Hibbits <firstname.lastname@example.org> Date: Fri Nov 7 04:46:10 2014 +0000 Add Position-independent Code model Module API. Summary: This makes PIC levels a Module flag attribute, which can be queried by the backend. The flag is named `PIC Level`, and can have a value of: .....
The bisect should most likely be run on one of the server. For example:
The first several lines of the script are commented out. They must be run at the command line.
git bisect reset
git bisect start bad-id good-id
git bisect run this-script