--- /dev/null
+Tests-Directory: tests/tests
+Depends: dgit, dgit-infrastructure, devscripts, rsync
esac
}
+finish- () {
+ :
+}
+
+test-begin-gencontrol () {
+ restrictions=''
+}
+
+restriction-gencontrol () {
+ restrictions+=" $r"
+}
+
+test-done-gencontrol () {
+ stanza=$(
+ sed <debian/tests/control.in ''
+ case "$restrictions" in
+ ?*) echo "Restrictions:$restrictions" ;;
+ esac
+ )
+ key=$(printf "%s" "$stanza" | sha256sum)
+ key=${key%% *}
+ eval "
+ stanza_$key=\"\$stanza\"
+ tests_$key+=\" \${t#tests/tests/}\"
+ "
+ keys=" ${keys/ $key /}"
+ keys+=" $key "
+}
+
+finish-gencontrol () {
+ for key in $keys; do
+ eval "
+ stanza=\$stanza_$key
+ tests=\$tests_$key
+ "
+ printf "Tests:%s\n%s\n\n" "$tests" "$stanza"
+ done
+}
+
for t in $(run-parts --list tests/tests); do
test-begin-$mode
for r in $(sed <$t -n '
done
test-done-$mode
done
+
+finish-$mode