chiark / gitweb /
test suite: tagupl: Check Source mismatch
[dgit.git] / tests / lib
index 28b08e617f51787711b9d19dcb92300a86328884..f6b653fa6578eab6948f5a972ef01a5ecc184c9e 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -31,6 +31,9 @@ t-set-intree
 : ${DGIT_TEST_DEBUG=-D}
 export DGIT_TEST_DEBUG
 
+: ${DGIT_TEST_DEBPUSH_DEBUG=x}
+export DGIT_TEST_DEBPUSH_DEBUG
+
 : ${DGIT_TEST_DISTRO+ ${distro=${DGIT_TEST_DISTRO}}}
 
 export GIT_COMMITTER_DATE='1530000000 +0100'
@@ -1194,6 +1197,35 @@ 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-run-drs () {
+       cd ..
+       cd tagupl
+
+       DGIT_DRS_ANY_URL=1 \
+       DGIT_DRS_MODE="tag2upload $tmp/$p $tagname" \
+        $troot/drs-git-ext 
+
+       cd $tmp/$p
+}
+
+t-tagupl-test () {
+       ${DGIT_DEBPUSH_TEST-git debpush} \
+               --distro=test-dummy --no-push -u Senatus "$@"
+
+       mkdir ../tagupl
+       t-tagupl-run-drs
+
+       t-dgit fetch
+       t-pushed-good master
+}
+
 t-buildproductsdir-config () {
        bpd=$tmp/bpd
        t-git-config dgit.default.build-products-dir $bpd
@@ -1213,13 +1245,17 @@ t-dependencies () {
        : "Hopefully installed: $*"
 }
 
+t-chain-test-somehow () {
+       export DGIT_TEST_TESTNAME="$testname"
+       export DGIT_TEST_TMPBASE="$tmpbase"
+       export ADTTMP=$tmp
+}
+
 t-chain-test () {
+       t-chain-test-somehow
        local ct=$1
        local d=${0%/*}
        cd $root
-       export DGIT_TEST_TESTNAME="$testname"
-       export DGIT_TEST_TMPBASE="$tmpbase"
-       export ADTTMP=$tmp
        exec "$d/$ct"
 }