diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-10-13 10:47:54 +0000 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2015-10-13 10:47:54 +0000 |
commit | 3c1577120a116092e7072cd82cda7b564abffe2c (patch) | |
tree | 98085d90c7a6afa936c834144612ab9c85e1a6cc /debian | |
parent | e1207ed691f9176d481dc1e380050d0f90320c23 (diff) | |
download | pbuilder-3c1577120a116092e7072cd82cda7b564abffe2c.tar pbuilder-3c1577120a116092e7072cd82cda7b564abffe2c.tar.gz |
debian/tests: add an autopkgtest running the unit tests
Diffstat (limited to 'debian')
-rw-r--r-- | debian/tests/control | 4 | ||||
-rw-r--r-- | debian/tests/unit-tests | 17 |
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 |