5 buildlog=Meta/AT.build-logs
9 trap 'rm -f "$t.*"; exit' 0 1 2 3 15
11 _x40="[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]"
12 _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
17 git for-each-ref --format='%(objectname)' 'refs/heads/*/*' |
18 git rev-list --not ko/maint --not --stdin |
21 git rev-parse --verify "$commit^{tree}"
22 done | sort -u >"$t.tree0"
23 sed -ne "s/A \($_x40\) .*/\1/p" "$log" | sort -u >"$t.tree1"
24 comm -13 "$t.tree0" "$t.tree1" | sed -e 's|.*|/^A &/d|' >"$t.prune"
26 next=$(git rev-parse --verify "refs/heads/next^0")
27 ko_next=$(git rev-parse --verify "refs/remotes/ko/next^0")
37 sed -f "$t.prune" "$log" >"$t.pruned"
38 cat "$t.pruned" >"$log"
43 git diff --name-only ko/master "$1" >"$t.d"
44 if ! grep -q -e git-svn "$t.d"
46 GIT_SKIP_TESTS="$GIT_SKIP_TESTS t91??"
48 if ! grep -q -e git-cvsexportcommit "$t.d"
50 GIT_SKIP_TESTS="$GIT_SKIP_TESTS t9200"
52 if ! grep -q -e git-cvsimport "$t.d"
54 GIT_SKIP_TESTS="$GIT_SKIP_TESTS t9600"
56 if test -n "$GIT_SKIP_TESTS"
65 commit=$(git rev-parse --verify "$1^0") &&
66 tree=$(git rev-parse --verify "$commit^{tree}") || return 1
67 grep -s "^A $tree " "$log" >/dev/null && return 0
70 git reset -q --hard HEAD^0 &&
71 git checkout -q "$commit^0" || return 1
73 check_skip_test "$tree"
75 PAGER= git show -s --pretty='format:* %h %s%n' "$commit" --
76 if ! Meta/Make -pedantic >"$o" 2>&1
79 elif ! Meta/Make -pedantic test >>"$o" 2>&1
86 : Meta/Make clean >/dev/null 2>&1
87 echo "A $tree $status" >>"$log"
101 mb=$(git merge-base "$commit" "$next") || return 1
102 test "$mb" = "$commit" && return 0
103 grep -s "^N $next $commit " "$log" >/dev/null && return 0
105 branch="${refname#refs/heads/}"
106 git reset -q --hard next^0
111 if ! git merge "$commit" >/dev/null 2>&1
113 conflict_count=$(git ls-files -u |
116 xargs grep -e '^<<<<<<< ' |
118 if test $conflict_count = 0
120 append_to_status "rerere ok"
123 append_to_status "conflict $conflict_count"
126 if test -z "$skip_build"
128 o="$buildlog/$commit"
129 check_skip_test "$commit"
130 if ! Meta/Make -pedantic >"$o" 2>&1
132 append_to_status "build error"
133 elif ! Meta/Make -pedantic test >>"$o" 2>&1
135 append_to_status "test error"
137 append_to_status "test ok"
141 : Meta/Make clean >/dev/null 2>&1
142 echo "N $next $commit $status" >>"$log"
147 Meta/Make clean >/dev/null 2>&1
149 git checkout -q HEAD^0
150 next=$(git rev-parse --verify "refs/remotes/ko/next^0")
160 git for-each-ref --format='%(objectname)' 'refs/heads/*/*' |
161 git rev-list --not ko/maint ko/master --not --stdin |
164 autotest "$commit" || echo "oops?"
168 test "$l0" = "$l1" || continue
170 git for-each-ref --format='%(objectname) %(refname)' \
172 while read commit refname
174 nexttest "$commit" "$refname" || echo "oops?"
178 test "$l0" = "$l1" || continue
191 git rev-list --no-walk "$@" 2>/dev/null || git rev-list "$@"