[dak/master] d/rules: Set GNUPGHOME for tests
The tests need a writable GNUPGHOME; don't assume that the default
location (based on HOME) satisfy that requirement.
Signed-off-by: Niels Thykier <niels@thykier.net>
---
debian/control | 3 ++-
debian/rules | 9 ++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/debian/control b/debian/control
index 0e171ed..dcfa929 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,8 @@
Source: dak
Section: misc
Priority: extra
-Build-Depends: python-all-dev,
+Build-Depends: debhelper (>= 9~),
+ python-all-dev,
python-apt,
python-debian,
python-debianbts,
diff --git a/debian/rules b/debian/rules
index abf436f..a8ddf03 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,5 +5,12 @@
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
- pytest -v
+ mkdir -p debian/test-gnupghome
+ GNUPGHOME=$$(pwd)/debian/test-gnupghome pytest -v
endif
+
+# Replace with "debian/test-gnupghome/" in d/clean once
+# debhelper (>= 9.20151116) can be used for dak
+override_dh_auto_clean:
+ rm -fr debian/test-gnupghome
+ dh_auto_clean
--
2.1.4
Reply to: