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 gencontrol-add-things () {
49 local varname=$1; shift
53 case " $'$varname'," in
54 *" "$thing","*) continue ;;
56 '$varname'+="${'$varname':+, }$thing"
61 restriction-gencontrol () {
62 if [ $r = x-dgit-out-of-tree-only ]; then return; fi
66 gencontrol-add-deps () {
67 gencontrol-add-things dependencies "$@"
70 dependencies-gencontrol () {
71 for dep in "$deps"; do
73 NO-DGIT) dependencies='chiark-utils-bin, faketime' ;;
74 NO-DEFAULT) dependencies='' ;;
75 GDR) gencontrol-add-deps \
76 git-debrebase git-buildpackage
78 DEBORIG) gencontrol-add-deps \
79 devscripts libdpkg-perl \
80 libgit-wrapper-perl liblist-compare-perl \
81 libstring-shellquote-perl libtry-tiny-perl \
82 # NB git-deborig is not compatible with
83 # t-tstunt-parsechangelog
85 *) gencontrol-add-deps "$dep" ;;
90 test-done-gencontrol () {
92 add_Depends="$dependencies" \
93 perl <debian/tests/control.in -wpe '
96 s{$}{ $ENV{"add_$h"} // "" }e;
99 case "$restrictions" in
100 ?*) echo "Restrictions:$restrictions" ;;
103 key=$(printf "%s" "$stanza" | sha256sum)
106 stanza_$key=\"\$stanza\"
107 tests_$key+=\" \${t#tests/tests/}\"
109 keys=" ${keys/ $key /}"
113 finish-gencontrol () {
119 printf "Tests:%s\n%s\n\n" "$tests" "$stanza"
127 /^: t-enumerate-tests-end$/q;
134 for r in $(seddery 's/^t-restrict //p'); do
137 for deps in $(seddery 's/^t-dependencies //p'); do
140 for import in $(seddery 's/^t-setup-import //p'); do
141 allsedderies tests/setup/$import
145 for t in $(run-parts --list tests/tests); do