Skip to content

Commit

Permalink
Bug 1140551 - Add support for setting number of test chunks in task d…
Browse files Browse the repository at this point in the history
…irectly r=garndt
  • Loading branch information
lightsofapollo committed Mar 14, 2015
1 parent 7e0e37e commit 7e3aff4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions testing/taskcluster/mach_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,15 +336,20 @@ def create_graph(self, **params):
test_parameters = copy.copy(build_parameters)
test_parameters['build_url'] = build_url
test_parameters['tests_url'] = tests_url
test_parameters['total_chunks'] = 1

test_definition = templates.load(test['task'], {})['task']
chunk_config = test_definition['extra']['chunks']

# Allow branch configs to override task level chunking...
if 'chunks' in test:
test_parameters['total_chunks'] = test['chunks']
chunk_config['total'] = test['chunks']

test_parameters['total_chunks'] = chunk_config['total']

for chunk in range(1, test_parameters['total_chunks'] + 1):
for chunk in range(1, chunk_config['total'] + 1):
if 'only_chunks' in test and \
chunk not in test['only_chunks']:
continue;
continue

test_parameters['chunk'] = chunk
test_task = templates.load(test['task'], test_parameters)
Expand Down

0 comments on commit 7e3aff4

Please sign in to comment.