summaryrefslogtreecommitdiff
path: root/tests/enumerate-tests
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2019-08-16 10:00:50 +0100
committerSean Whitton <spwhitton@spwhitton.name>2019-08-16 10:00:50 +0100
commit0569aa2c25dc3374d9d51dfea9dc09be2fa6e510 (patch)
tree4af4ab614da0ebe6cfc858e845367994c9396a85 /tests/enumerate-tests
parentfa3ba6501e1f62bda0f2f455555abe3ba1588b15 (diff)
parent690ba12221518b883a1895ca6be8243c1f39640b (diff)
Merge tag 'debian/9.7' into buster-bpo
dgit release 9.7 for unstable (sid) [dgit] [dgit distro=debian no-split] # gpg: Signature made Sun 11 Aug 2019 01:11:36 AM BST # gpg: using RSA key 559AE46C2D6B6D3265E7CBA1E3E3392348B50D39 # gpg: Can't check signature: No public key
Diffstat (limited to 'tests/enumerate-tests')
-rwxr-xr-xtests/enumerate-tests29
1 files changed, 21 insertions, 8 deletions
diff --git a/tests/enumerate-tests b/tests/enumerate-tests
index 8ee34be..680236e 100755
--- a/tests/enumerate-tests
+++ b/tests/enumerate-tests
@@ -45,18 +45,27 @@ test-begin-gencontrol () {
dependencies='dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime'
}
+gencontrol-add-things () {
+ local varname=$1; shift
+ local delim=$1; shift
+ local thing
+ eval '
+ for thing in "$@"; do
+ case " $'$varname$delim '" in
+ *" "$thing"'$delim' "*) continue ;;
+ esac
+ '$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 () {
- for dep in "$@"; do
- case " $dependencies," in
- *" "$dep","*) continue ;;
- esac
- dependencies+="${dependencies:+, }$dep"
- done
+ gencontrol-add-things dependencies , "$@"
}
dependencies-gencontrol () {
@@ -89,7 +98,7 @@ test-done-gencontrol () {
}
'
case "$restrictions" in
- ?*) echo "Restrictions:$restrictions" ;;
+ ?*) echo "Restrictions: $restrictions" ;;
esac
)
key=$(printf "%s" "$stanza" | sha256sum)
@@ -132,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