| 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-on-swarm-specific steps. | 7 Based on chromium_factory.py and adds chromium-on-swarm-specific steps. |
| 8 | 8 |
| 9 Common usage: | 9 Common usage: |
| 10 - For a split builder&tester configuration, use: | 10 - For a split builder&tester configuration, use: |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 Caller must not reuse factory_properties since it is modified in-place. | 105 Caller must not reuse factory_properties since it is modified in-place. |
| 106 """ | 106 """ |
| 107 valid_tests = set(s.test_name for s in SWARM_TESTS) | 107 valid_tests = set(s.test_name for s in SWARM_TESTS) |
| 108 assert not (set(tests) - set(valid_tests)) | 108 assert not (set(tests) - set(valid_tests)) |
| 109 target = 'Release' | 109 target = 'Release' |
| 110 | 110 |
| 111 factory_properties.setdefault('gclient_env', {}) | 111 factory_properties.setdefault('gclient_env', {}) |
| 112 factory_properties['gclient_env'].setdefault('GYP_DEFINES', '') | 112 factory_properties['gclient_env'].setdefault('GYP_DEFINES', '') |
| 113 factory_properties['gclient_env']['GYP_DEFINES'] += ( | 113 factory_properties['gclient_env']['GYP_DEFINES'] += ( |
| 114 ' test_isolation_mode=hashtable test_isolation_outdir=' + | 114 ' test_isolation_mode=archive test_isolation_outdir=' + |
| 115 isolate_server) | 115 isolate_server) |
| 116 | 116 |
| 117 # Do not pass the tests to the ChromiumFactory, they'll be processed below. | 117 # Do not pass the tests to the ChromiumFactory, they'll be processed below. |
| 118 f = self.ChromiumFactory(target=target, | 118 f = self.ChromiumFactory(target=target, |
| 119 options=options, | 119 options=options, |
| 120 factory_properties=factory_properties) | 120 factory_properties=factory_properties) |
| 121 | 121 |
| 122 swarm_command_obj = swarm_commands.SwarmCommands( | 122 swarm_command_obj = swarm_commands.SwarmCommands( |
| 123 f, | 123 f, |
| 124 target, | 124 target, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 171 |
| 172 # Reorder the tests by the order specified in SWARM_TESTS. E.g. the slower | 172 # Reorder the tests by the order specified in SWARM_TESTS. E.g. the slower |
| 173 # tests are retrieved last. | 173 # tests are retrieved last. |
| 174 for swarm_test in SWARM_TESTS: | 174 for swarm_test in SWARM_TESTS: |
| 175 if swarm_test.test_name in tests: | 175 if swarm_test.test_name in tests: |
| 176 tests.remove(swarm_test.test_name) | 176 tests.remove(swarm_test.test_name) |
| 177 swarm_command_obj.AddIsolateTest(swarm_test.test_name) | 177 swarm_command_obj.AddIsolateTest(swarm_test.test_name) |
| 178 | 178 |
| 179 assert not tests | 179 assert not tests |
| 180 return f | 180 return f |
| OLD | NEW |