From 8cfd0ba039b8f4b11ff5895329e7c1756235c301 Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Fri, 28 Jun 2019 19:24:15 -0400 Subject: [PATCH] Allow for test groups with double digits (#58532) --- test/runner/lib/sanity/integration_aliases.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/runner/lib/sanity/integration_aliases.py b/test/runner/lib/sanity/integration_aliases.py index 9ece2599e27..a2dc7568ceb 100644 --- a/test/runner/lib/sanity/integration_aliases.py +++ b/test/runner/lib/sanity/integration_aliases.py @@ -100,7 +100,7 @@ class IntegrationAliasesTest(SanitySingleVersion): :rtype: dict[str, set[int]] """ if not self._shippable_test_groups: - matches = [re.search(r'^[ #]+- env: T=(?P[^/]+)/(?P.+)/(?P[1-9])$', line) for line in self.shippable_yml_lines] + matches = [re.search(r'^[ #]+- env: T=(?P[^/]+)/(?P.+)/(?P[1-9][0-9]?)$', line) for line in self.shippable_yml_lines] entries = [(match.group('group'), int(match.group('number'))) for match in matches if match] for key, value in entries: @@ -126,7 +126,9 @@ class IntegrationAliasesTest(SanitySingleVersion): if max(group_numbers) != len(group_numbers): display.warning('Max test group "%s" in shippable.yml is %d instead of %d.' % (name, max(group_numbers), len(group_numbers)), unique=True) - if len(group_numbers) > 1: + if max(group_numbers) > 9: + alias = 'shippable/%s/group(%s)/' % (name, '|'.join(str(i) for i in range(min(group_numbers), max(group_numbers) + 1))) + elif len(group_numbers) > 1: alias = 'shippable/%s/group[%d-%d]/' % (name, min(group_numbers), max(group_numbers)) else: alias = 'shippable/%s/group%d/' % (name, min(group_numbers))