chiark / gitweb /
test suite: Break out t-tagupl-*
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 6 Jul 2019 15:35:16 +0000 (16:35 +0100)
committerSean Whitton <spwhitton@spwhitton.name>
Sun, 7 Jul 2019 08:54:19 +0000 (09:54 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/lib
tests/tests/tagupl

index acee15dba331ee11d3b77bcdcf2dcfb72e57a04c..36de84b6ad3094fe7f8a51793eddd0ddec9faff7 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -1194,6 +1194,31 @@ t-policy-periodic () {
        : '))))))))))))))))))))))))))))))))))))))))'
 }
 
+t-tagupl-settings () {
+       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
+}
+
+t-tagupl-test () {
+       ${DGIT_DEBPUSH_TEST-git debpush} \
+               --distro=test-dummy --no-push -u Senatus "$@"
+
+       cd ..
+       mkdir tagupl
+       cd tagupl
+
+       DGIT_DRS_ANY_URL=1 \
+       DGIT_DRS_MODE="tag2upload $tmp/$p $tagname" \
+        $troot/drs-git-ext 
+
+       cd $tmp/$p
+
+       t-dgit fetch
+       t-pushed-good master
+}
+
 t-buildproductsdir-config () {
        bpd=$tmp/bpd
        t-git-config dgit.default.build-products-dir $bpd
index c53367f49daa367a4f2dcb2a22fc906c9b5448d7..7859400712926c015d5c24423819e27249806a17 100755 (executable)
@@ -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'
@@ -23,29 +27,9 @@ git checkout -B master quilt-tip-2
 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
-
-t-dgit fetch
-t-pushed-good master
-
 t-ok