chiark / gitweb /
test suite: gdr-viagit, gdr-newupstream: do not auto-import t-setup-gnupg.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 27 Jun 2018 20:41:38 +0000 (21:41 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 27 Jun 2018 22:01:06 +0000 (23:01 +0100)
We provide a new mechanism for individual tests to disable the
automatic t-setup-import of gnupg.

We need to add this to all the other setup/ that these import, too.
gdr-convert-gbp is particularly awkward because it wants gnupg if
$ifarchive isn't `:'.  There we arrange to suppress its automatic
inclusion, but add it again by hand if appropriate.

This fixes these two tests in chroots without gnupg.

Closes:#902559.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
tests/lib
tests/setup/gdr-convert-gbp
tests/setup/gdr-convert-gbp-noarchive
tests/tests/gdr-newupstream
tests/tests/gdr-viagit

index ad5e0fe95a35fc10f8b601aa4827a83a2782ca8d..d166e85272c84b1ebf3edf8b39f6e12313958051 100644 (file)
@@ -5,6 +5,8 @@ dgit (5.4~) unstable; urgency=medium
     apropos of discussion in #902534.
 
   Bugfixes:
     apropos of discussion in #902534.
 
   Bugfixes:
+  * test suite: gdr-viagit, gdr-newupstream: Do not spuriously
+    fail if gnupg not serendipitously installed.  Closes:#902559.
   * Fix bug ref to #865444 in previous changelog entry.
 
  --
   * Fix bug ref to #865444 in previous changelog entry.
 
  --
index bd06d20d21cc7364ce1e056777e5fd03e35b4b29..f3fb0dab462cbac4ca0dcdb9c575ee3783a533aa 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -1134,7 +1134,11 @@ t-alt-test () {
 
 t-git-config dgit.default.old-dsc-distro test-dummy
 
 
 t-git-config dgit.default.old-dsc-distro test-dummy
 
-case "$0" in
-*/gnupg) ;;
-*)     t-setup-import gnupg    ;;
-esac
+for import in ${autoimport-gnupg}; do
+       case "$0" in
+       */$import) ;;
+       *)
+               t-setup-import $import
+               ;;
+       esac
+done
index 0b525c879f99dfdba84651203f4cb9d583fb869e..e523fd33752f20b8cfbb3e6cefc818d89cfdfe5d 100755 (executable)
@@ -1,8 +1,11 @@
 #!/bin/bash
 set -e
 #!/bin/bash
 set -e
+autoimport=
 . tests/lib
 . $troot/lib-gdr
 
 . tests/lib
 . $troot/lib-gdr
 
+$ifarchive t-setup-import gnupg
+
 t-dependencies GDR
 
 t-tstunt-parsechangelog
 t-dependencies GDR
 
 t-tstunt-parsechangelog
index dfeea3b984333aa259068a5b3e08cf1cf045ad99..1d6758b754ca42078ad7ecdbaf07f46c15970a1b 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
 #!/bin/bash
+autoimport=
 set -e
 . tests/lib
 . $troot/lib-gdr
 set -e
 . tests/lib
 . $troot/lib-gdr
index cfa00523d050f919d4dea36407a8391a44fc81fa..ee987f511c10ec52be7473406dc0fffee45c83da 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/bash
 set -e
 #!/bin/bash
 set -e
+autoimport=
 . tests/lib
 
 t-dependencies NO-DGIT GDR
 . tests/lib
 
 t-dependencies NO-DGIT GDR
index 644d2d4515becd28e999fa1ab925fb07ee1949ee..a83e622b175f697c23ece0ee144357dd7c8bee15 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/bash
 set -e
 #!/bin/bash
 set -e
+autoimport=
 . tests/lib
 
 t-dependencies NO-DGIT GDR
 . tests/lib
 
 t-dependencies NO-DGIT GDR