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 429d46db22ce6deabd01306e3cc2874f421cdaa5..a532b526bfa56efcccaf6000016914a1eb4749e9 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 dfaaa25eebbee7334a722e34c14be6e6b5b9a7a3..5d32288217f01ac41350422731093b1858d723fa 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'