X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=tests%2Ftests%2Ftagupl;h=c45f5e927d81086e87d79f9f6fdfab36796840e8;hb=985cefa0cc7c74ec57954fc5fbd46af0bcf03297;hp=27dd973d7c0259911c01e930278429e16c99d1c3;hpb=9a5b14f4294318b8f11871ab5aad6d5afd849e0a;p=dgit.git diff --git a/tests/tests/tagupl b/tests/tests/tagupl index 27dd973d..c45f5e92 100755 --- a/tests/tests/tagupl +++ b/tests/tests/tagupl @@ -12,7 +12,11 @@ t-worktree 1.0 v=1.0-1 +t-tagupl-settings + cd $p +git checkout -b native + git checkout --orphan upstream quilt-tip-2 git rm -rf debian git commit -m 'pseudo-upstream' @@ -20,36 +24,45 @@ git tag upstream/1.0 git checkout -B master quilt-tip-2 -#git-deborig -#t-dgit --quilt=gbp --dgit-view-save=split.b1 push-source --new --overwrite -#xxx - upstream=$(git rev-parse upstream/1.0~0) tagname=test-dummy/$v -${DGIT_DEBPUSH_TEST-git debpush} \ - --distro=test-dummy --quilt=gbp --no-push -u Senatus +t-tagupl-test --no-push --quilt=gbp # xxx test pushing -cd .. -mkdir tagupl -cd tagupl - -export DGIT_DRS_EMAIL_NOREPLY=noreply@example.org -export DGIT_DRS_SENDMAIL=$troot/tstunt/sendmail -export DGIT_DRS_DGIT=$troot/tstunt/dgit -t-chain-test-somehow - -DGIT_DRS_ANY_URL=1 \ -DGIT_DRS_MODE="tag2upload $tmp/$p $tagname" \ - $troot/drs-git-ext - # todo: test each miss/rejection -cd $tmp/$p +ident=ok + +git cat-file tag $tagname >../basetag +v=1.0-2 +tagname=test-dummy/$v -t-dgit fetch -t-pushed-good master +perl -i -ne ' + next if $.==1../^$/; + next if m/^----/..0; + s/\b1\.0-1\b/1.0-2/g; + print or die $!; +' ../basetag + +with-mangled () { + local perl=$1 + perl <../basetag >../badtag-$ident -pe "$perl" + git tag -u Senatus -f -s -m "$(cat ../badtag-$ident)" "$tagname" + + t-tagupl-run-drs +} + +expect-quit () { + mv ../tagupl/overall.log ../tagupl/overall.log-$ident + ident=$1 + local perl=$2 + local mstring=$3 + with-mangled "$perl" + grep ": $mstring" ../tagupl/overall.log +} + +expect-quit noplease s/please-upload/plunk/ 'tag missing please-upload' t-ok