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 libstring-shellquote-perl libtry-tiny-perl \
71 # NB git-deborig is not compatible with
72 # t-tstunt-parsechangelog
74 *) gencontrol-add-deps "$dep" ;;
79 test-done-gencontrol () {
81 add_Depends="$dependencies" \
82 perl <debian/tests/control.in -wpe '
85 s{$}{ $ENV{"add_$h"} // "" }e;
88 case "$restrictions" in
89 ?*) echo "Restrictions:$restrictions" ;;
92 key=$(printf "%s" "$stanza" | sha256sum)
95 stanza_$key=\"\$stanza\"
96 tests_$key+=\" \${t#tests/tests/}\"
98 keys=" ${keys/ $key /}"
102 finish-gencontrol () {
108 printf "Tests:%s\n%s\n\n" "$tests" "$stanza"
116 /^: t-enumerate-tests-end$/q;
121 for t in $(run-parts --list tests/tests); do
123 for r in $(seddery 's/^t-restrict //p'); do
126 for deps in $(seddery 's/^t-dependencies //p'); do