diff options
Diffstat (limited to 'debian/tests')
-rw-r--r-- | debian/tests/control | 7 | ||||
-rw-r--r-- | debian/tests/test-not-root | 15 | ||||
-rw-r--r-- | debian/tests/test-root | 15 |
3 files changed, 37 insertions, 0 deletions
diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..bba379d --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,7 @@ +Tests: test-not-root +Depends: build-essential, autoconf, pkg-config, file +Restrictions: superficial skippable rw-build-tree + +Tests: test-root +Depends: build-essential, autoconf, pkg-config, file +Restrictions: superficial rw-build-tree needs-root breaks-testbed diff --git a/debian/tests/test-not-root b/debian/tests/test-not-root new file mode 100644 index 0000000..211de1e --- /dev/null +++ b/debian/tests/test-not-root @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +if [ "$(id -u)" = '0' ]; then + # Skip, we cannot declare we do not want root. + exit 77 +fi + +t=test-not-root + +mkdir -p $t +cd $t +../configure --disable-nls --disable-dselect +make installcheck diff --git a/debian/tests/test-root b/debian/tests/test-root new file mode 100644 index 0000000..c3cb1c2 --- /dev/null +++ b/debian/tests/test-root @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +if [ "$(id -u)" != '0' ]; then + # Fail, we declared needing root as a restriction. + exit 1 +fi + +t=test-root + +mkdir -p $t +cd $t +../configure --disable-nls --disable-dselect +make installcheck |