summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-12-19 16:17:00 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-12-19 16:17:04 +0000
commitce13c15ee5ac88b16b99af9f0071f4ecaff004f4 (patch)
tree195d8dd3ea8d2fff79eb396b2bad57561c96ed96
parentf60ec72817bf5cc38a8ec83abd2e065f0433001c (diff)
Provide and use stunt lintian and debuild
This avoids lintian complaining about our stupid test packages. We need the stunt debuild because debuild likes to launder the environment, removing our stunt lintian from PATH ! Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r--debian/changelog4
-rw-r--r--tests/lib10
-rwxr-xr-xtests/tests/gbp-orig2
-rwxr-xr-xtests/tstunt/debuild4
-rwxr-xr-xtests/tstunt/lintian3
5 files changed, 23 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index b58479c..f6d9272 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,10 @@ dgit (2.12~) unstable; urgency=medium
* Fix dgit-repos-policy-debian which broke due to recent git setting
GIT_ALTERNATE_OBJECT_DIRECTORIES in the pre-receive-hook.
+ Test suite:
+ * Provide and use stunt lintian and debuild, to avoid lintian
+ complaining about our stupid test packages.
+
--
dgit (2.11) unstable; urgency=medium
diff --git a/tests/lib b/tests/lib
index b033dde..d075bc7 100644
--- a/tests/lib
+++ b/tests/lib
@@ -759,6 +759,16 @@ t-tstunt-parsechangelog () {
t-tstunt dpkg-parsechangelog Dpkg/Changelog/Parse.pm
}
+t-tstunt-lintian () {
+ t-tstunt lintian
+}
+
+t-tstunt-debuild () {
+ : ${DGIT_TEST_REAL_DEBUILD:=$(type -p debuild)}
+ export DGIT_TEST_REAL_DEBUILD
+ t-tstunt debuild
+}
+
t-incoming-dsc () {
local dsc=${p}_${v}.dsc
incoming_dsc=$tmp/incoming/$dsc
diff --git a/tests/tests/gbp-orig b/tests/tests/gbp-orig
index ffc145f..29dd457 100755
--- a/tests/tests/gbp-orig
+++ b/tests/tests/gbp-orig
@@ -3,6 +3,8 @@ set -e
. tests/lib
t-tstunt-parsechangelog
+t-tstunt-debuild
+t-tstunt-lintian
t-archive-none example
t-git-none
diff --git a/tests/tstunt/debuild b/tests/tstunt/debuild
new file mode 100755
index 0000000..2b2ca71
--- /dev/null
+++ b/tests/tstunt/debuild
@@ -0,0 +1,4 @@
+#!/bin/bash
+set -e
+echo "DGIT TEST STUNT DEBUILD $*" >&2
+"${DGIT_TEST_REAL_DEBUILD}" --preserve-env --preserve-envvar PATH "$@"
diff --git a/tests/tstunt/lintian b/tests/tstunt/lintian
new file mode 100755
index 0000000..f7c2985
--- /dev/null
+++ b/tests/tstunt/lintian
@@ -0,0 +1,3 @@
+#!/bin/sh
+echo >&2 'W: dgit test suite stunt lintian detects no problems'
+exit 0