X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=tests%2Fenumerate-tests;h=8ee34bec4a354ec9824d098108ccb871c8061e16;hb=HEAD;hp=c80a35c94c0ba4181be1db87af4bfe2f88043764;hpb=3c4154c9a98c7c1ecb9ca224590e80b81465d305;p=dgit.git diff --git a/tests/enumerate-tests b/tests/enumerate-tests index c80a35c9..9b9271cb 100755 --- a/tests/enumerate-tests +++ b/tests/enumerate-tests @@ -42,29 +42,30 @@ finish- () { test-begin-gencontrol () { restrictions='' - dependencies='dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime' + dependencies='dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime, liburi-perl' } gencontrol-add-things () { local varname=$1; shift + local delim=$1; shift local thing eval ' for thing in "$@"; do - case " $'$varname'," in - *" "$thing","*) continue ;; + case " $'$varname$delim '" in + *" "$thing"'$delim' "*) continue ;; esac - '$varname'+="${'$varname':+, }$thing" + '$varname'+="${'$varname':+'$delim' }$thing" done ' } restriction-gencontrol () { if [ $r = x-dgit-out-of-tree-only ]; then return; fi - restrictions+=" $r" + gencontrol-add-things restrictions '' "$r" } gencontrol-add-deps () { - gencontrol-add-things dependencies "$@" + gencontrol-add-things dependencies , "$@" } dependencies-gencontrol () { @@ -97,7 +98,7 @@ test-done-gencontrol () { } ' case "$restrictions" in - ?*) echo "Restrictions:$restrictions" ;; + ?*) echo "Restrictions: $restrictions" ;; esac ) key=$(printf "%s" "$stanza" | sha256sum) @@ -140,6 +141,10 @@ allsedderies () { for import in $(seddery 's/^t-setup-import //p'); do allsedderies tests/setup/$import done + if egrep -q '^t-alt-test *$' <$tf; then + local leaf=${tf#tests/tests/} + allsedderies tests/tests/"${leaf#*-}" + fi } for t in $(run-parts --list tests/tests); do