From e079e1ff7f807be20888cd4cf8ca527f3e7ab6a0 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 25 Aug 2018 17:21:37 +0100 Subject: test suite: dch: Always use tstunt/debchange 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 --- tests/enumerate-tests | 6 +++--- tests/lib | 5 +++-- tests/tstunt/debchange | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/enumerate-tests b/tests/enumerate-tests index 0f37c96..429d46d 100755 --- a/tests/enumerate-tests +++ b/tests/enumerate-tests @@ -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 diff --git a/tests/lib b/tests/lib index 24ccf7e..376585c 100644 --- 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 } diff --git a/tests/tstunt/debchange b/tests/tstunt/debchange index 8c81823..f98e7fe 100755 --- a/tests/tstunt/debchange +++ b/tests/tstunt/debchange @@ -1,4 +1,4 @@ #!/bin/sh set -x faketime @"${GIT_AUTHOR_DATE% *}" \ -"$DGIT_TEST_REAL_DEBCHANGE" "$@" +"${DGIT_TEST_REAL_DEBCHANGE-debchange}" "$@" -- cgit v1.2.3