chiark / gitweb /
test suite: New restriction x-dgit-out-of-tree-only
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 29 Sep 2018 10:19:45 +0000 (11:19 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 29 Sep 2018 11:48:14 +0000 (12:48 +0100)
This is filtered out of debian/tests/control, but honoured in-tree.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/enumerate-tests
tests/lib-restricts

index 429d46d..a532b52 100755 (executable)
@@ -46,6 +46,7 @@ test-begin-gencontrol () {
 }
 
 restriction-gencontrol () {
+       if [ $r = x-dgit-out-of-tree-only ]; then return; fi
        restrictions+=" $r"
 }
 
index dfaaa25..5d32288 100644 (file)
@@ -6,6 +6,12 @@ t-restriction-x-dgit-intree-only () {
        return 1
 }
 
+t-restriction-x-dgit-out-of-tree-only () {
+       if [ "x$DGIT_TEST_INTREE" = x ]; then return 0; fi
+       echo 'running out of development tree'
+       return 1
+}
+
 t-restriction-x-dgit-git-only () {
        if test -d .git; then return 0; fi
        echo 'not running out of git clone'