From 3fa257bb4ed88187fb3e5f4ab13c18b4fac22cc6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 20:35:34 +0200 Subject: Adding debian version 1.22.4. Signed-off-by: Daniel Baumann --- debian/tests/control | 42 ++++++++++++++++++++++++++++++++++++++++++ debian/tests/test-func | 10 ++++++++++ debian/tests/test-func-root | 13 +++++++++++++ debian/tests/test-not-root | 21 +++++++++++++++++++++ debian/tests/test-root | 21 +++++++++++++++++++++ 5 files changed, 107 insertions(+) create mode 100644 debian/tests/control create mode 100644 debian/tests/test-func create mode 100644 debian/tests/test-func-root create mode 100644 debian/tests/test-not-root create mode 100644 debian/tests/test-root (limited to 'debian/tests') diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..ede8a6a --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,42 @@ +Tests: + test-not-root +Depends: + build-essential, + autoconf, + pkgconf, + libmd-dev, + file, +Restrictions: + superficial + skippable + +Tests: + test-root +Depends: + build-essential, + autoconf, + pkgconf, + libmd-dev, + file +Restrictions: + superficial + needs-root + breaks-testbed + +Tests: + test-func +Depends: + @, + eatmydata, +Restrictions: + allow-stderr + +Tests: + test-func-root +Depends: + @, + eatmydata, +Restrictions: + allow-stderr + needs-root + breaks-testbed diff --git a/debian/tests/test-func b/debian/tests/test-func new file mode 100644 index 0000000..aab45d2 --- /dev/null +++ b/debian/tests/test-func @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +export DPKG_TESTSUITE_OPTIONS="debug" +export DPKG_ADMINDIR="$AUTOPKGTEST_TMP/db" +export DPKG_INSTDIR="$AUTOPKGTEST_TMP/root" + +mkdir -p "$DPKG_INSTDIR" +eatmydata make -C tests installtest DPKG_INSTDIR="$DPKG_INSTDIR" DPKG_ADMINDIR="$DPKG_ADMINDIR" diff --git a/debian/tests/test-func-root b/debian/tests/test-func-root new file mode 100644 index 0000000..2c337e2 --- /dev/null +++ b/debian/tests/test-func-root @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +if [ "$(id -u)" != '0' ]; then + # Fail, we declared needing root as a restriction. + exit 1 +fi + +export DPKG_TESTSUITE_OPTIONS="debug as-root" +export DPKG_ADMINDIR="$AUTOPKGTEST_TMP/db" + +eatmydata make -C tests installtest DPKG_ADMINDIR="$DPKG_ADMINDIR" diff --git a/debian/tests/test-not-root b/debian/tests/test-not-root new file mode 100644 index 0000000..7438d70 --- /dev/null +++ b/debian/tests/test-not-root @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +if [ "$(id -u)" = '0' ]; then + # Skip, we cannot declare we do not want root. + exit 77 +fi + +srcdir="$(pwd)" + +cd $AUTOPKGTEST_TMP +"$srcdir/configure" \ + --disable-nls \ + --disable-dselect \ + --prefix=/usr \ + --libexecdir='${exec_prefix}/lib' \ + --sysconfdir=/etc \ + --localstatedir=/var \ + # EOL +make installcheck TESTSUITEFLAGS=--verbose diff --git a/debian/tests/test-root b/debian/tests/test-root new file mode 100644 index 0000000..f09da15 --- /dev/null +++ b/debian/tests/test-root @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +if [ "$(id -u)" != '0' ]; then + # Fail, we declared needing root as a restriction. + exit 1 +fi + +srcdir="$(pwd)" + +cd $AUTOPKGTEST_TMP +"$srcdir/configure" \ + --disable-nls \ + --disable-dselect \ + --prefix=/usr \ + --libexecdir='${exec_prefix}/lib' \ + --sysconfdir=/etc \ + --localstatedir=/var \ + # EOL +make installcheck TESTSUITEFLAGS=--verbose -- cgit v1.2.3