summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/debhelper/debhelper-script-token-unneeded
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/debhelper/debhelper-script-token-unneeded')
-rw-r--r--t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/debian/postinst6
-rwxr-xr-xt/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/debian/rules38
-rw-r--r--t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/fill-values3
-rw-r--r--t/recipes/checks/debhelper/debhelper-script-token-unneeded/eval/desc3
-rw-r--r--t/recipes/checks/debhelper/debhelper-script-token-unneeded/eval/hints3
5 files changed, 53 insertions, 0 deletions
diff --git a/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/debian/postinst b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/debian/postinst
new file mode 100644
index 0000000..185dc3a
--- /dev/null
+++ b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/debian/postinst
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+run something
+
+# We should have a debhelper token.
+exit 0
diff --git a/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/debian/rules b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/debian/rules
new file mode 100755
index 0000000..cd6ef15
--- /dev/null
+++ b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/debian/rules
@@ -0,0 +1,38 @@
+#!/usr/bin/make -f
+#
+# Use an alternate rules file that doesn't call dh to test not warning
+# about debhelper script tokens if we call no programs that care about
+# them.
+
+pkg = $(shell dh_listpackages)
+
+build: build-indep build-arch
+build-indep:
+build-arch:
+
+clean:
+ dh_testdir
+ dh_testroot
+ dh_clean
+
+binary: binary-indep binary-arch
+binary-arch:
+binary-indep:
+ dh_testdir
+ dh_testroot
+ dh_prep
+ dh_install
+ dh_installchangelogs
+ # dh_installdocs may modify maintainer scripts
+ install -m 644 debian/copyright debian/$(pkg)/usr/share/doc/$(pkg)
+ dh_link
+ dh_compress
+ dh_fixperms
+ # dh_installdeb needs #DEBHELPER# token too
+ mkdir -p debian/$(pkg)/DEBIAN
+ install -m 755 debian/postinst debian/$(pkg)/DEBIAN
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+.PHONY: build-arch build-indep build binary binary-arch binary-indep clean
diff --git a/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/fill-values b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/fill-values
new file mode 100644
index 0000000..7d19c16
--- /dev/null
+++ b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/build-spec/fill-values
@@ -0,0 +1,3 @@
+Skeleton: upload-native
+Testname: debhelper-script-token-unneeded
+Description: Check unnecessary debhelper script token
diff --git a/t/recipes/checks/debhelper/debhelper-script-token-unneeded/eval/desc b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/eval/desc
new file mode 100644
index 0000000..48dee5d
--- /dev/null
+++ b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/eval/desc
@@ -0,0 +1,3 @@
+Testname: debhelper-script-token-unneeded
+Test-Against: maintainer-script-lacks-debhelper-token
+Check: debhelper
diff --git a/t/recipes/checks/debhelper/debhelper-script-token-unneeded/eval/hints b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/eval/hints
new file mode 100644
index 0000000..b803499
--- /dev/null
+++ b/t/recipes/checks/debhelper/debhelper-script-token-unneeded/eval/hints
@@ -0,0 +1,3 @@
+debhelper-script-token-unneeded (source): debian-build-system debhelper [debian/rules]
+debhelper-script-token-unneeded (source): debhelper-compat-virtual-relation 13 [debian/control]
+debhelper-script-token-unneeded (source): debhelper-compat-level 13