chiark / gitweb /
test suite: dch: Always use tstunt/debchange
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 25 Aug 2018 16:21:37 +0000 (17:21 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 26 Aug 2018 00:20:44 +0000 (01:20 +0100)
We are going to make this more sophisticated, so use it everywhere to
avoid duplication.

We need to soup up tstunt/debchange so that it does not depend on
DGIT_TEST_REAL_DEBCHANGE.  If it hasn't been put on the PATH by
t-tstunt, that isn't set, and we can just run debchange from PATH.

This makes faketime a test dependency for all the tests which don't
have NO-DEFAULT.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/tests/control
tests/enumerate-tests
tests/lib
tests/tstunt/debchange

index 33b01ace16e83f577d13f353092c1e3497c24e6e..bb060936d1b47bee5fd70eab0d2e20ac0fd00e2f 100644 (file)
@@ -1,36 +1,36 @@
 Tests: build-modes-gbp
 Tests-Directory: tests/tests
-Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, git-buildpackage
+Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime, git-buildpackage
 
 Tests: clone-reprepro downstream-gitless
 Tests-Directory: tests/tests
-Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, reprepro
+Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime, reprepro
 
 Tests: dpkgsourceignores-docs
 Tests-Directory: tests/tests
-Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc
+Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime
 Restrictions: x-dgit-intree-only
 
 Tests: defdistro-dsd-clone-drs dsd-clone-drs
 Tests-Directory: tests/tests
-Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc
+Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime
 Restrictions: x-dgit-intree-only x-dgit-git-only
 
 Tests: gdr-merge-conflicts
 Tests-Directory: tests/tests
-Depends: chiark-utils-bin, git-debrebase, git-buildpackage, faketime, quilt
+Depends: chiark-utils-bin, faketime, git-debrebase, git-buildpackage, quilt
 
 Tests: gdr-diverge-nmu gdr-diverge-nmu-dgit gdr-edits gdr-fresh gdr-import-dgit gdr-import-dgitview gdr-import-nostitch gdr-makepatches7 gdr-merge gdr-subcommands gdr-unprocessable gdr-unprocessable-hints
 Tests-Directory: tests/tests
-Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, git-debrebase, git-buildpackage, faketime
+Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime, git-debrebase, git-buildpackage
 
 Tests: gdr-newupstream gdr-viagit
 Tests-Directory: tests/tests
-Depends: chiark-utils-bin, git-debrebase, git-buildpackage, faketime
+Depends: chiark-utils-bin, faketime, git-debrebase, git-buildpackage
 
 Tests: gitattributes
 Tests-Directory: tests/tests
-Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, bsdgames, man-db, git-man
+Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime, bsdgames, man-db, git-man
 
 Tests: hint-testsuite-triggers
 Tests-Directory: tests/tests
@@ -39,25 +39,25 @@ Restrictions: hint-testsuite-triggers
 
 Tests: manpages-format
 Tests-Directory: tests/tests
-Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, man-db, make, groff, git-debrebase
+Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime, man-db, make, groff, git-debrebase
 
 Tests: defdistro-mirror mirror mirror-debnewgit mirror-private
 Tests-Directory: tests/tests
-Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, rsync
+Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime, rsync
 
 Tests: build-modes-sbuild quilt-gbp-build-modes-sbuild
 Tests-Directory: tests/tests
-Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, sbuild
+Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime, sbuild
 Restrictions: x-dgit-schroot-build
 
 Tests: sbuild-gitish
 Tests-Directory: tests/tests
-Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, sbuild, man-db
+Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime, sbuild, man-db
 Restrictions: x-dgit-schroot-build
 
 Tests: spelling
 Tests-Directory: tests/tests
-Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc
+Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime
 Restrictions: x-dgit-git-only
 
 Tests: test-list-uptodate
@@ -66,9 +66,9 @@ Depends: git
 
 Tests: trustingpolicy-replay
 Tests-Directory: tests/tests
-Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, dput-ng
+Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime, dput-ng
 
 Tests: absurd-gitapply badcommit-rewrite build-modes checkout clone-clogsigpipe clone-gitnosuite clone-nogit debpolicy-dbretry debpolicy-newreject debpolicy-quilt-gbp defdistro-rpush defdistro-setup distropatches-reject dpkgsourceignores-correct drs-clone-nogit drs-push-masterupdate drs-push-rejects dsd-clone-nogit dsd-divert fetch-localgitonly fetch-somegit-notlast gbp-orig gitconfig gitworktree import-dsc import-maintmangle import-native import-nonnative import-tarbomb inarchivecopy mismatches-contents mismatches-dscchanges multisuite newtag-clone-nogit oldnewtagalt oldtag-clone-nogit orig-include-exclude orig-include-exclude-chkquery overwrite-chkclog overwrite-junk overwrite-splitbrains overwrite-version pbuilder protocol-compat push-buildproductsdir push-newpackage push-newrepeat push-nextdgit push-source push-source-with-changes quilt quilt-gbp quilt-gbp-build-modes quilt-singlepatch quilt-splitbrains quilt-useremail rpush sourceonlypolicy tag-updates unrepresentable version-opt
 Tests-Directory: tests/tests
-Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc
+Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime
 
index 0f37c961027d66568eb5d63ea0c3845f20088a95..429d46db22ce6deabd01306e3cc2874f421cdaa5 100755 (executable)
@@ -42,7 +42,7 @@ finish- () {
 
 test-begin-gencontrol () {
        restrictions=''
-       dependencies='dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc'
+       dependencies='dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime'
 }
 
 restriction-gencontrol () {
@@ -58,10 +58,10 @@ gencontrol-add-deps () {
 dependencies-gencontrol () {
        for dep in "$deps"; do
                case "$dep" in
-               NO-DGIT) dependencies='chiark-utils-bin' ;;
+               NO-DGIT) dependencies='chiark-utils-bin, faketime' ;;
                NO-DEFAULT) dependencies='' ;;
                GDR) gencontrol-add-deps \
-                       git-debrebase git-buildpackage faketime
+                       git-debrebase git-buildpackage
                        ;;
                *) gencontrol-add-deps "$dep" ;;
                esac
index 24ccf7e297f7dd7fc8c5c79f38265e6ecf96d60c..376585ca9cc02205a35f0dd39d1c8fd56577017d 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -1041,7 +1041,8 @@ t-merge-conflicted-stripping-conflict-markers () {
 t-commit () {
        local msg=$1
        v=${2:-${majorv:-1}.$revision}
-       dch --force-distribution -v$v --distribution ${3:-unstable} "$1"
+       $troot/tstunt/debchange \
+               --force-distribution -v$v --distribution ${3:-unstable} "$1"
        git add debian/changelog
        debcommit
        revision=$(( ${revision-0} + 1 ))
@@ -1058,7 +1059,7 @@ t-dch-commit-r () {
 }
 
 t-dch-commit () {
-       faketime @"${GIT_AUTHOR_DATE% *}" dch "$@"
+       $troot/tstunt/debchange "$@"
        git commit -m "dch $*" debian/changelog
 }
 
index 8c81823f27a5e5a55570cb221b2b5d09999230be..f98e7fec3fd2cd3dd5aeecb2ce49ff0d4b6abf8d 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 set -x
 faketime @"${GIT_AUTHOR_DATE% *}" \
-"$DGIT_TEST_REAL_DEBCHANGE" "$@"
+"${DGIT_TEST_REAL_DEBCHANGE-debchange}" "$@"