diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-03-23 00:09:08 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-03-23 00:09:08 (GMT) |
commit | 5b24ed8d987d654154feb2e89bf822b05a648217 (patch) | |
tree | 2e399537363bb866908e7b0d5343f15fab2d75f2 | |
parent | 6ab646e998fc66e68c3571d5caded7784dcfd431 (diff) | |
download | git-5b24ed8d987d654154feb2e89bf822b05a648217.zip git-5b24ed8d987d654154feb2e89bf822b05a648217.tar.gz git-5b24ed8d987d654154feb2e89bf822b05a648217.tar.bz2 |
Meta/cycle-run: try building each individual step
-rwxr-xr-x | cycle-run | 65 |
1 files changed, 42 insertions, 23 deletions
@@ -3,23 +3,25 @@ : ${RANGE:=origin/master..origin/seen} ${J:=j32} ${OKNG:="(OK|NG)"} test_it () { - commit=$1 subject=$2 + type=$1 commit=$2 subject=$3 log=".Cycle/log.$commit" rm -f "$log" git ls-files -x Meta -x .Cycle -o -z | xargs -r -0 rm -rf ( echo "*** log for $subject ***" && - - D= && - git checkout --detach "$commit" && - if ! Meta/Make -$J - then - D=DEVELOPER= - Meta/Make -$J -- DEVELOPER= - fi && - Meta/Make -$J -- $D test && - Meta/Make -$J -- $D doc + case "$type" in + C) + Meta/Make -$J + ;; + M) + Meta/Make -$J -- SPARSE_FLAGS=-Wsparse-error sparse + ;; + T) + Meta/Make -$J -- test && + Meta/Make -$J -- doc + ;; + esac status=$? @@ -40,13 +42,23 @@ test_it () { test_them () { while read merge parent sides do - for side in $sides - do - git rev-parse --verify --quiet "$side" || continue + case "$parent" in + ?*) + egrep "^$OKNG M$merge" .Cycle/log >/dev/null && continue echo "TEST M $merge" - egrep "^$OKNG $side" .Cycle/log >/dev/null && continue - echo "TEST $side $merge" - done + for tip in $sides + do + git rev-parse --verify --quiet "$tip" || continue + egrep "^$OKNG T$tip" .Cycle/log >/dev/null && continue + echo "TEST $tip $merge" + done + ;; + '') + commit=$merge + git rev-parse --verify --quiet "$commit" || continue + egrep "^$OKNG C$commit" .Cycle/log >/dev/null || + echo "TEST C $commit" + esac done | sed -n -e 's/^TEST //p' >.Cycle/plan @@ -55,14 +67,20 @@ test_them () { total=$count echo TEST $count ON $(date) >>.Cycle/log - while read side merge + while read tip merge do - case "$side" in - M) + case "$tip" in + M) + type=M + commit=$merge + subject=$(git show -s --format="%s" "$merge") ;; + C) + type=C commit=$merge subject=$(git show -s --format="%s" "$merge") ;; *) - commit=$side + type=T + commit=$tip subject=$( git show -s --format="%s" "$merge" | sed -e 's/^Merge branch '\''\(.*\)'\'' into .*/\1/' @@ -70,13 +88,13 @@ test_them () { esac echo >&2 -n "$count/$total ?? $subject
" - if test_it $commit "$subject" + if test_it $type $commit "$subject" then OK=OK else OK=NG fi - echo "$OK $commit $count" >>.Cycle/log + echo "$OK $type$commit $count" >>.Cycle/log echo >&2 "$count/$total $OK $subject" count=$(( $count - 1 )) done <.Cycle/plan @@ -93,4 +111,5 @@ do done git fetch +git rev-list --no-merges $RANGE | test_them git rev-list --first-parent --parents $RANGE | test_them |