This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=423b3f6307841592c678a8b15a709a503f29c1f4

commit 423b3f6307841592c678a8b15a709a503f29c1f4
Author: Guillem Jover <[email protected]>
AuthorDate: Sat Feb 23 03:50:21 2019 +0100

    debian: Clarify autopkgtest behavior on root/non-root requirement
    
    Mark the not-root test as skippable, and skip it if running as root, as
    there is no restriction currently to represent that. For the root test
    clarify the failing exit code with a comment.
---
 debian/changelog           | 1 +
 debian/tests/control       | 2 +-
 debian/tests/test-not-root | 3 ++-
 debian/tests/test-root     | 1 +
 4 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 00c9a7f2a..ba898d939 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ dpkg (1.19.5) UNRELEASED; urgency=medium
       distribution tarball.
   * Packaging:
     - autopkgtest: Add file to Depends fields.
+    - autopkgtest: Clarify behavior on root/non-root requirement.
 
   [ Updated programs translations ]
   * German (Sven Joachim).
diff --git a/debian/tests/control b/debian/tests/control
index 1a97d42d1..bba379db1 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,6 +1,6 @@
 Tests: test-not-root
 Depends: build-essential, autoconf, pkg-config, file
-Restrictions: superficial rw-build-tree
+Restrictions: superficial skippable rw-build-tree
 
 Tests: test-root
 Depends: build-essential, autoconf, pkg-config, file
diff --git a/debian/tests/test-not-root b/debian/tests/test-not-root
index 75d7a94df..211de1eb6 100644
--- a/debian/tests/test-not-root
+++ b/debian/tests/test-not-root
@@ -3,7 +3,8 @@
 set -e
 
 if [ "$(id -u)" = '0' ]; then
-  exit 1
+  # Skip, we cannot declare we do not want root.
+  exit 77
 fi
 
 t=test-not-root
diff --git a/debian/tests/test-root b/debian/tests/test-root
index f2472237c..c3cb1c257 100644
--- a/debian/tests/test-root
+++ b/debian/tests/test-root
@@ -3,6 +3,7 @@
 set -e
 
 if [ "$(id -u)" != '0' ]; then
+  # Fail, we declared needing root as a restriction.
   exit 1
 fi
 

-- 
Dpkg.Org's dpkg

Reply via email to