Last active
June 24, 2016 21:38
-
-
Save dsprenkels/188eb0c39df00eb0d79deede375ccbcc to your computer and use it in GitHub Desktop.
git-bisect script example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# build initially and skip if this build is broken | |
./configure --enable-ccache --enable-debug | |
make -j3 check-stage1-TSUITE || (make clean; rm -rf ./x86_64-unknown-linux-gnu/ dist/ dl/ tmp/; exit 125) | |
# deploy our regression test | |
cp issue-XXX.rs src/test/TESTSUITE/ | |
# run the regression test suite | |
make -j3 check-stage1-TSUITE | |
# invert the return code of `make` | |
if [ "$?" -eq 0 ]; then | |
status=1 | |
else | |
status=0 | |
fi | |
# cleanup | |
rm src/test/TESTSUITE/issue-XXX.rs | |
make clean | |
rm -rf ./x86_64-unknown-linux-gnu/ dist/ dl/ tmp/ # clean more aggressively | |
# exit and pass return code to git-bisect | |
exit $status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment