summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog9
-rw-r--r--debian/control1
-rw-r--r--debian/tests/control9
-rw-r--r--debian/tests/start-net29
4 files changed, 46 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 3a50a60..6707de0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,9 +22,14 @@ sane-backends (1.0.24-10) UNRELEASED; urgency=medium
* debian/saned@.service:
- Remove Alias from [Install] Section (Closes: #778268).
* sane-utils.[postinst|postrm]:
- + Replace fixed path with a POSIX-compliant shell function to check
+ - Replace fixed path with a POSIX-compliant shell function to check
the existence of a command.
-
+ * Add autopkgtests:
+ - debian/control:
+ + Add Testsuite: autopkgtest.
+ - New debian/tests/control
+ - New debian/tests/start-net:
+ - Testing network interface activation with systemd.
-- Jörg Frings-Fürst <debian@jff-webhosting.net> Sun, 18 Jan 2015 11:46:18 +0100
diff --git a/debian/control b/debian/control
index 4eb203d..75ff8b2 100644
--- a/debian/control
+++ b/debian/control
@@ -25,6 +25,7 @@ Build-Depends:
texlive,
texlive-latex-extra,
xutils-dev
+Testsuite: autopkgtest
Homepage: http://www.sane-project.org
Vcs-Git: git://anonscm.debian.org/collab-maint/sane-backends.git
Vcs-Browser: http://anonscm.debian.org/cgit/collab-maint/sane-backends.git
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..0d875a9
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,9 @@
+#
+# control file for autopkgtests
+# writen from Jörg Frings-Fürst <debian@jff-webhosting.net>
+#
+# 1. start-net
+#
+Tests: start-net
+Depends: sane-utils
+Restrictions: needs-root allow-stderr breaks-testbed
diff --git a/debian/tests/start-net b/debian/tests/start-net
new file mode 100644
index 0000000..65679c3
--- /dev/null
+++ b/debian/tests/start-net
@@ -0,0 +1,29 @@
+#!/bin/sh
+set -ex
+
+# Simple test for sane-backends.
+# Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
+# dep8 restrictions: breaks-bestbed needs-root allow-stderr
+
+
+# Enable localhost
+sed -i '/localhost/d' /etc/sane.d/saned.conf
+echo localhost >>/etc/sane.d/saned.conf
+
+# Enable pnm
+sed -i 's/^#\(pnm\)$/\1/' /etc/sane.d/dll.conf
+
+# Enable saned.socket
+systemctl enable saned.socket
+
+#
+# test
+#
+CNT=`scanimage -d net -L | grep net: | wc -l`
+
+if [ ${CNT} -eq 2 ] ; then
+ exit 0
+else
+ exit 100
+fi
+