Bug 1274578 - Do not use alias when specific try -u test requested; r=dustin

This commit is contained in:
Geoff Brown 2016-08-16 14:56:45 -06:00
Родитель 83fa4597e7
Коммит defab7007f
2 изменённых файлов: 5 добавлений и 19 удалений

Просмотреть файл

@ -224,14 +224,6 @@ class TestTryOptionSyntax(unittest.TestCase):
{'test': 'gtest', 'platforms': ['linux', 'win32'], 'only_chunks': set('1')},
]))
def test_u_chunks_platform_alias(self):
"-u e10s-1[linux] selects the first chunk of every e10s test on linux"
tos = TryOptionSyntax('try: -u e10s-1[linux]', graph_with_jobs)
self.assertEqual(sorted(tos.unittests), sorted([
{'test': t, 'platforms': ['linux'], 'only_chunks': set('1')}
for t in unittest_tasks if 'e10s' in t
]))
def test_t_none(self):
"-t none sets talos=[]"
tos = TryOptionSyntax('try: -t none', graph_with_jobs)

Просмотреть файл

@ -410,17 +410,9 @@ class TryOptionSyntax(object):
seen_chunks = {}
for test in tests:
matches = TEST_CHUNK_SUFFIX.match(test['test'])
if not matches:
results.extend(self.handle_alias(test, all_tests))
continue
name = matches.group(1)
chunk = matches.group(2)
test['test'] = name
for test in self.handle_alias(test, all_tests):
name = test['test']
if matches:
name = matches.group(1)
chunk = matches.group(2)
if name in seen_chunks:
seen_chunks[name].add(chunk)
else:
@ -428,6 +420,8 @@ class TryOptionSyntax(object):
test['test'] = name
test['only_chunks'] = seen_chunks[name]
results.append(test)
else:
results.extend(self.handle_alias(test, all_tests))
# uniquify the results over the test names
results = {test['test']: test for test in results}.values()