From: Ian Jackson Date: Sun, 16 Jul 2017 18:08:24 +0000 (+0100) Subject: test suite: sbuild-gitish: Find sbuild rune in the manpage X-Git-Tag: archive/debian/4.1~56 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=f5c0d33ede8a4c8f1a45ecb57923d66bc694903d test suite: sbuild-gitish: Find sbuild rune in the manpage This avoids duplicating this rune (so the manpage can't get out of date). Signed-off-by: Ian Jackson --- diff --git a/debian/tests/control b/debian/tests/control index 04095cb2..7b7d11cd 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -19,11 +19,16 @@ Tests: defdistro-mirror mirror mirror-debnewgit mirror-private Tests-Directory: tests/tests Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, rsync -Tests: build-modes-sbuild quilt-gbp-build-modes-sbuild sbuild-gitish +Tests: build-modes-sbuild quilt-gbp-build-modes-sbuild Tests-Directory: tests/tests Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, sbuild Restrictions: x-dgit-schroot-build +Tests: sbuild-gitish +Tests-Directory: tests/tests +Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, sbuild, man-db +Restrictions: x-dgit-schroot-build + Tests: spelling Tests-Directory: tests/tests Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential diff --git a/tests/tests/sbuild-gitish b/tests/tests/sbuild-gitish index c20bc93d..c0ca9276 100755 --- a/tests/tests/sbuild-gitish +++ b/tests/tests/sbuild-gitish @@ -2,19 +2,33 @@ set -e . tests/lib -t-dependencies sbuild +t-dependencies sbuild man-db t-restrict x-dgit-schroot-build t-tstunt-parsechangelog t-prep-newpackage example 1.1 +buildrune=$( + (export LC_ALL=C.UTF-8 + if [ "$DGIT_TEST_INTREE" ]; then + make -C $DGIT_TEST_INTREE dgit-user.7.view + else + man 7 dgit-user + fi) | \ + perl -ne ' + next unless m/^ +Using sbuild$/ .. 0; + next unless m/^ +\%/ .. 0; + next if !m/\S/ .. 0; + s/^ +\%//; + print or die $!; + ' +) + cd $p build () { - git clean -xdf - sbuild -c build -A --no-clean-source \ - --dpkg-source-opts='-Zgzip -z1 --format=1.0 -sn' + eval "$buildrune" } git checkout quilt-tip-1.1~0