diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-09-29 11:19:45 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-09-29 12:48:14 +0100 |
commit | 461ac887006c3e2e4e430f9cca41c0fe2fa0a8fc (patch) | |
tree | 2d91c28dcacc3684e721a242337284f6b7fb6da4 | |
parent | cf3d7744cb378b1f1450ffd7c206c2b7d96db0ca (diff) |
test suite: New restriction x-dgit-out-of-tree-only
This is filtered out of debian/tests/control, but honoured in-tree.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-x | tests/enumerate-tests | 1 | ||||
-rw-r--r-- | tests/lib-restricts | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/enumerate-tests b/tests/enumerate-tests index 429d46d..a532b52 100755 --- a/tests/enumerate-tests +++ b/tests/enumerate-tests @@ -46,6 +46,7 @@ test-begin-gencontrol () { } restriction-gencontrol () { + if [ $r = x-dgit-out-of-tree-only ]; then return; fi restrictions+=" $r" } diff --git a/tests/lib-restricts b/tests/lib-restricts index dfaaa25..5d32288 100644 --- a/tests/lib-restricts +++ b/tests/lib-restricts @@ -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' |