| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Utility class to build the swarm master BuildFactory's. | 5 """Utility class to build the swarm master BuildFactory's. |
| 6 | 6 |
| 7 Based on chromium_factory.py and adds chromium-specific steps.""" | 7 Based on chromium_factory.py and adds chromium-specific steps.""" |
| 8 | 8 |
| 9 import os | 9 import os |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 factory_properties, gclient_deps) | 21 factory_properties, gclient_deps) |
| 22 | 22 |
| 23 swarm_command_obj = swarm_commands.SwarmCommands(factory, | 23 swarm_command_obj = swarm_commands.SwarmCommands(factory, |
| 24 target, | 24 target, |
| 25 self._build_dir, | 25 self._build_dir, |
| 26 self._target_platform) | 26 self._target_platform) |
| 27 | 27 |
| 28 gclient_env = factory_properties.get("gclient_env") | 28 gclient_env = factory_properties.get("gclient_env") |
| 29 gyp_defines = gclient_env['GYP_DEFINES'] | 29 gyp_defines = gclient_env['GYP_DEFINES'] |
| 30 if 'tests_run=hashtable' in gyp_defines: | 30 if 'tests_run=hashtable' in gyp_defines: |
| 31 for test in tests: | 31 # Send of all the test requests as a single step. |
| 32 swarm_command_obj.AddSwarmTestStep(self._target_platform, | 32 swarm_inputs = [os.path.join('src', 'out', target, test + '.results') |
| 33 for test in tests] |
| 34 swarm_command_obj.AddTriggerSwarmTestStep(self._target_platform, |
| 33 factory_properties.get('swarm_server', 'localhost'), | 35 factory_properties.get('swarm_server', 'localhost'), |
| 34 factory_properties.get('swarm_port', '9001'), | 36 factory_properties.get('swarm_port', '9001'), |
| 35 factory_properties.get('min_swarm_shards', '3'), | 37 factory_properties.get('min_swarm_shards', '3'), |
| 36 factory_properties.get('max_swarm_shards', '3'), | 38 factory_properties.get('max_swarm_shards', '3'), |
| 37 os.path.join('src', 'out', target, test + '.results'), | 39 swarm_inputs, |
| 40 tests) |
| 41 |
| 42 # Each test has its output returned as its own step. |
| 43 for test in tests: |
| 44 swarm_command_obj.AddGetSwarmTestStep( |
| 45 factory_properties.get('swarm_server', 'localhost'), |
| 46 factory_properties.get('swarm_port', '9001'), |
| 38 test) | 47 test) |
| 39 | 48 |
| 40 return factory | 49 return factory |
| OLD | NEW |