summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-06-27 21:41:38 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-06-27 23:01:06 +0100
commit3fbce7431379321c745f304c0f0134ae9b066701 (patch)
tree82c1bdf12490003232e7325d6cfc059dd8096aac /tests
parent99b7b3246b32cde43dca421571c06f42e00c1baf (diff)
test suite: gdr-viagit, gdr-newupstream: do not auto-import t-setup-gnupg.
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib12
-rwxr-xr-xtests/setup/gdr-convert-gbp3
-rwxr-xr-xtests/setup/gdr-convert-gbp-noarchive1
-rwxr-xr-xtests/tests/gdr-newupstream1
-rwxr-xr-xtests/tests/gdr-viagit1
5 files changed, 14 insertions, 4 deletions
diff --git a/tests/lib b/tests/lib
index bd06d20..f3fb0da 100644
--- a/tests/lib
+++ b/tests/lib
@@ -1134,7 +1134,11 @@ t-alt-test () {
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
diff --git a/tests/setup/gdr-convert-gbp b/tests/setup/gdr-convert-gbp
index 0b525c8..e523fd3 100755
--- a/tests/setup/gdr-convert-gbp
+++ b/tests/setup/gdr-convert-gbp
@@ -1,8 +1,11 @@
#!/bin/bash
set -e
+autoimport=
. tests/lib
. $troot/lib-gdr
+$ifarchive t-setup-import gnupg
+
t-dependencies GDR
t-tstunt-parsechangelog
diff --git a/tests/setup/gdr-convert-gbp-noarchive b/tests/setup/gdr-convert-gbp-noarchive
index dfeea3b..1d6758b 100755
--- a/tests/setup/gdr-convert-gbp-noarchive
+++ b/tests/setup/gdr-convert-gbp-noarchive
@@ -1,4 +1,5 @@
#!/bin/bash
+autoimport=
set -e
. tests/lib
. $troot/lib-gdr
diff --git a/tests/tests/gdr-newupstream b/tests/tests/gdr-newupstream
index cfa0052..ee987f5 100755
--- a/tests/tests/gdr-newupstream
+++ b/tests/tests/gdr-newupstream
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
+autoimport=
. tests/lib
t-dependencies NO-DGIT GDR
diff --git a/tests/tests/gdr-viagit b/tests/tests/gdr-viagit
index 644d2d4..a83e622 100755
--- a/tests/tests/gdr-viagit
+++ b/tests/tests/gdr-viagit
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
+autoimport=
. tests/lib
t-dependencies NO-DGIT GDR