Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 25 lines (19 sloc) 0.555 kB
8293b54 Added git-test-once and git-test-bisect so that it's possible to test…
Wayne Walter authored
1 #!/bin/sh
2 # Run a command over a sequence of commits.
3 # Example:
4 # git test-once 'make clean && make compile && make test'
5
6 ref_name=test
7
8 already_tested() {
9 git show-ref "refs/test/${ref_name}/${ref_name}-$hash" "$hash" > /dev/null && echo "Already passed $hash"
10 }
11
12 tested_on() {
13 git update-ref "refs/test/${ref_name}/${ref_name}-$hash" "$hash"
14 echo "Passed: $hash."
15 }
16
17 broke_on() {
18 echo "Broke on $v"
19 return 1
20 }
21
22 hash=`git rev-parse HEAD`
23 echo "Testing $1"
24 already_tested $hash || ( eval "$1" && tested_on $hash ) || broke_on $hash
Something went wrong with that request. Please try again.