Skip to content

Instantly share code, notes, and snippets.

@raphink
Created February 7, 2013 10:46
Show Gist options
  • Save raphink/4730232 to your computer and use it in GitHub Desktop.
Save raphink/4730232 to your computer and use it in GitHub Desktop.
Test all commits in range, performing a `make check` on each. Fail on first failed commit.
#!/bin/bash
RANGE=$1
while read rev def; do
echo -n "Testing $rev ($def) "
git checkout $rev >/dev/null 2>/dev/null
make check > /dev/null 2>/dev/null
[[ $? != 0 ]] && echo "NOK" && exit 1
echo "OK"
git checkout . >/dev/null 2>/dev/null
done < <(git rev-list --pretty=oneline $RANGE | tac)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment