Meta/cycle-run: avoid testing the same tree twice
Junio C Hamano committed
Apr 6, 2021 at 16:21 UTC
6b51cb2e8fa6503f16cd95a73c7e5c65f3497a3a
1 file changed
+10
-3
cycle-run
+10
-3
@@ -41,24 +41,30 @@ test_it () {
41
esac
42
}
43
44
+tested () {
45
+ # sign=$1 commit=$2
46
+ egrep "^$OKNG $1($2|$(git rev-parse "$2^{tree}"))" .Cycle/log >/dev/null
47
+}
48
+
49
test_them () {
50
while read merge parent sides
51
do
52
case "$parent" in
53
?*)
49
- egrep "^$OKNG M$merge" .Cycle/log >/dev/null && continue
54
+ tested M $merge && continue
55
echo "TEST M $merge"
56
+
57
for tip in $sides
58
do
59
git rev-parse --verify --quiet "$tip" || continue
54
- egrep "^$OKNG T$tip" .Cycle/log >/dev/null && continue
60
+ tested T $tip && continue
61
echo "TEST $tip $merge"
62
done
63
;;
64
'')
65
commit=$merge
66
git rev-parse --verify --quiet "$commit" || continue
61
- egrep "^$OKNG C$commit" .Cycle/log >/dev/null ||
67
+ tested C $commit && continue
68
echo "TEST C $commit"
69
esac
70
done |
@@ -97,6 +103,7 @@ test_them () {
103
OK=NG
104
fi
105
echo "$OK $type$commit $count" >>.Cycle/log
106
+ echo "$OK $type$(git rev-parse $commit^{tree}) $count" >>.Cycle/log
107
echo >&2 "$count/$total $OK $subject"
108
count=$(( $count - 1 ))
109
done <.Cycle/plan