aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
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