Skip to content

Instantly share code, notes, and snippets.

@dsprenkels
Last active June 24, 2016 21:38
Show Gist options
  • Save dsprenkels/188eb0c39df00eb0d79deede375ccbcc to your computer and use it in GitHub Desktop.
Save dsprenkels/188eb0c39df00eb0d79deede375ccbcc to your computer and use it in GitHub Desktop.
git-bisect script example
#!/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