aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-10-13 10:47:54 +0000
committerMattia Rizzolo <mattia@mapreri.org>2015-10-13 10:47:54 +0000
commit3c1577120a116092e7072cd82cda7b564abffe2c (patch)
tree98085d90c7a6afa936c834144612ab9c85e1a6cc /debian
parente1207ed691f9176d481dc1e380050d0f90320c23 (diff)
downloadpbuilder-3c1577120a116092e7072cd82cda7b564abffe2c.tar
pbuilder-3c1577120a116092e7072cd82cda7b564abffe2c.tar.gz
debian/tests: add an autopkgtest running the unit tests
Diffstat (limited to 'debian')
-rw-r--r--debian/tests/control4
-rw-r--r--debian/tests/unit-tests17
2 files changed, 21 insertions, 0 deletions
diff --git a/debian/tests/control b/debian/tests/control
index 5caf738..952a6ae 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,3 +1,7 @@
+Tests: unit-tests
+Depends: @
+Restrictions: allow-stderr
+
Tests: build-procenv
Depends: @, debian-keyring, distro-info, lsb-release, ubuntu-archive-keyring | ubuntu-keyring
Restrictions: needs-root
diff --git a/debian/tests/unit-tests b/debian/tests/unit-tests
new file mode 100644
index 0000000..21b25d8
--- /dev/null
+++ b/debian/tests/unit-tests
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+if [ -z "$TMPDIR" ]; then
+ if [ -n "$ADTTMP" ]; then
+ TMPDIR="$ADTTMP"
+ else
+ TMPDIR="$(mktemp -d --tmpdir=/tmp pbuilder-unit-tests-XXXXXXXXXX)"
+ fi
+fi
+
+cp t/* "$TMPDIR"
+export PBUILDER_TEST_VERBOSE="yes"
+"$TMPDIR"/runtests.sh
+
+rm -r $TMPDIR