16 whynot=$(t-restriction-$r)
23 1.?*) whynots="$whynots${whynots:+; }$whynot" ;;
24 *) fail "restriction $r for $t gave $rc $whynot !"
35 ?*) echo >&2 "SKIP $t $whynots" ;;
43 test-begin-gencontrol () {
45 dependencies='dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime'
48 restriction-gencontrol () {
49 if [ $r = x-dgit-out-of-tree-only ]; then return; fi
53 gencontrol-add-deps () {
55 dependencies+="${dependencies:+, }$dep"
59 dependencies-gencontrol () {
60 for dep in "$deps"; do
62 NO-DGIT) dependencies='chiark-utils-bin, faketime' ;;
63 NO-DEFAULT) dependencies='' ;;
64 GDR) gencontrol-add-deps \
65 git-debrebase git-buildpackage
67 DEBORIG) gencontrol-add-deps \
68 devscripts libdpkg-perl \
69 libgit-wrapper-perl liblist-compare-perl \
70 # NB git-deborig is not compatible with
71 # t-tstunt-parsechangelog
73 *) gencontrol-add-deps "$dep" ;;
78 test-done-gencontrol () {
80 add_Depends="$dependencies" \
81 perl <debian/tests/control.in -wpe '
84 s{$}{ $ENV{"add_$h"} // "" }e;
87 case "$restrictions" in
88 ?*) echo "Restrictions:$restrictions" ;;
91 key=$(printf "%s" "$stanza" | sha256sum)
94 stanza_$key=\"\$stanza\"
95 tests_$key+=\" \${t#tests/tests/}\"
97 keys=" ${keys/ $key /}"
101 finish-gencontrol () {
107 printf "Tests:%s\n%s\n\n" "$tests" "$stanza"
115 /^: t-enumerate-tests-end$/q;
120 for t in $(run-parts --list tests/tests); do
122 for r in $(seddery 's/^t-restrict //p'); do
125 for deps in $(seddery 's/^t-dependencies //p'); do