From: Ian Jackson Date: Sat, 29 Sep 2018 10:19:45 +0000 (+0100) Subject: test suite: New restriction x-dgit-out-of-tree-only X-Git-Tag: archive/debian/7.0_pre1~68 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=461ac887006c3e2e4e430f9cca41c0fe2fa0a8fc 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 --- diff --git a/tests/enumerate-tests b/tests/enumerate-tests index 429d46db..a532b526 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 dfaaa25e..5d322882 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'