From 3c1577120a116092e7072cd82cda7b564abffe2c Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Tue, 13 Oct 2015 10:47:54 +0000 Subject: debian/tests: add an autopkgtest running the unit tests --- debian/tests/control | 4 ++++ debian/tests/unit-tests | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 debian/tests/unit-tests 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 -- cgit v1.2.3