chiark / gitweb /
test suite: sbuild-gitish: Find sbuild rune in the manpage
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 16 Jul 2017 18:08:24 +0000 (19:08 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 18 Jul 2017 21:07:18 +0000 (22:07 +0100)
This avoids duplicating this rune (so the manpage can't get out of
date).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/tests/control
tests/tests/sbuild-gitish

index 04095cb272dabdbef95fd9c28fb1b4f6c59aa37f..7b7d11cdf6b7fb09dbfe15e181a4f6982d9ffd52 100644 (file)
@@ -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-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-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
 Tests: spelling
 Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential
index c20bc93d141f5fbd102f3dcdfd9b495a54070b3a..c0ca92765504821fa7cf8547343a0e14bad5a033 100755 (executable)
@@ -2,19 +2,33 @@
 set -e
 . tests/lib
 
 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
 
 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 () {
 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
 }
 
 git checkout quilt-tip-1.1~0