3 : ${RANGE:=origin/master..origin/seen} ${J:=j32} ${OKNG:="(OK|NG)"}
6 type=$1 commit=$2 subject=$3
7 log=".Cycle/log.$commit"
9 git ls-files -x Meta -x .Cycle -o -z | xargs -r -0 rm -rf
12 echo "*** log for $subject ***" &&
15 # Single parent commit on a topic
17 Meta/Make -$J -- SPARSE_FLAGS=-Wsparse-error sparse
20 # Merges on the first-parent chain on seen
21 Meta/Make -$J -- SPARSE_FLAGS=-Wsparse-error sparse &&
25 # Commit at the tip of a topic
26 Meta/Make -$J SANITIZE=address,undefined -- test &&
33 # Does 'distclean' clean them up properly?
34 Meta/Make -- $D distclean >/dev/null
35 case $(git ls-files -x Meta -x .Cycle -o | wc -l) in
37 *) git ls-files -x Meta -x .Cycle -o
49 egrep "^$OKNG $1($2|$(git rev-parse "$2^{tree}"))" .Cycle/log >/dev/null
53 while read merge parent sides
57 tested M $merge && continue
62 git rev-parse --verify --quiet "$tip" || continue
63 tested T $tip && continue
64 echo "TEST $tip $merge"
69 git rev-parse --verify --quiet "$commit" || continue
70 tested C $commit && continue
74 sed -n -e 's/^TEST //p' >.Cycle/plan
76 count=$(wc -l <.Cycle/plan)
77 case $count in 0) return ;; esac
80 echo TEST $count ON $(date) >>.Cycle/log
87 subject=$(git show -s --format="%s" "$commit") ;;
91 subject=$(git show -s --format="%s" "$commit") ;;
96 git show -s --format="%s" "$merge" |
97 sed -e 's/^Merge branch '\''\(.*\)'\'' into .*/\1/'
101 echo >&2 -n "$count/$total ?? $subject
\r"
102 if test_it $type $commit "$subject"
108 echo "$OK $type$commit $count" >>.Cycle/log
109 echo "$OK $type$(git rev-parse $commit^{tree}) $count" >>.Cycle/log
110 echo >&2 "$count/$total $OK $subject"
111 count=$(( $count - 1 ))
116 git reflog expire --expire=now --expire-unreachable=now --all
119 for l in .Cycle/log.[0-9a-f]*
122 git rev-parse --verify "$x" >/dev/null 2>&1 || rm -f "$l"
127 git rev-list --no-merges $RANGE
128 git rev-list --first-parent --parents $RANGE