| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 from common.skia import global_constants | 5 from common.skia import global_constants |
| 6 | 6 |
| 7 | 7 |
| 8 DEPS = [ | 8 DEPS = [ |
| 9 'ct_swarming', | 9 'ct_swarming', |
| 10 'file', | 10 'file', |
| 11 'depot_tools/gclient', | 11 'depot_tools/gclient', |
| 12 'gsutil', | 12 'gsutil', |
| 13 'recipe_engine/path', | 13 'recipe_engine/path', |
| 14 'recipe_engine/properties', | 14 'recipe_engine/properties', |
| 15 'recipe_engine/step', | 15 'recipe_engine/step', |
| 16 'recipe_engine/time', | 16 'recipe_engine/time', |
| 17 'swarming', | 17 'swarming', |
| 18 'swarming_client', | 18 'swarming_client', |
| 19 'depot_tools/tryserver', | 19 'depot_tools/tryserver', |
| 20 'zip', | |
| 21 ] | 20 ] |
| 22 | 21 |
| 23 | 22 |
| 24 CT_SKPS_ISOLATE = 'ct_skps.isolate' | 23 CT_SKPS_ISOLATE = 'ct_skps.isolate' |
| 25 | 24 |
| 26 # Do not batch archive more slaves than this value. This is used to prevent | 25 # Do not batch archive more slaves than this value. This is used to prevent |
| 27 # no output timeouts in the 'isolate tests' step. | 26 # no output timeouts in the 'isolate tests' step. |
| 28 MAX_SLAVES_TO_BATCHARCHIVE = 100 | 27 MAX_SLAVES_TO_BATCHARCHIVE = 100 |
| 29 | 28 |
| 30 # Number of slaves to shard CT runs to. | 29 # Number of slaves to shard CT runs to. |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 api.tryserver.maybe_apply_issue() | 94 api.tryserver.maybe_apply_issue() |
| 96 | 95 |
| 97 # Build the tool. | 96 # Build the tool. |
| 98 api.step('build %s' % skia_tool, | 97 api.step('build %s' % skia_tool, |
| 99 ['make', skia_tool, 'BUILDTYPE=%s' % configuration], | 98 ['make', skia_tool, 'BUILDTYPE=%s' % configuration], |
| 100 cwd=api.path['checkout']) | 99 cwd=api.path['checkout']) |
| 101 | 100 |
| 102 skps_chromium_build = api.properties.get( | 101 skps_chromium_build = api.properties.get( |
| 103 'skps_chromium_build', DEFAULT_SKPS_CHROMIUM_BUILD) | 102 'skps_chromium_build', DEFAULT_SKPS_CHROMIUM_BUILD) |
| 104 ct_num_slaves = api.properties.get('ct_num_slaves', DEFAULT_CT_NUM_SLAVES) | 103 ct_num_slaves = api.properties.get('ct_num_slaves', DEFAULT_CT_NUM_SLAVES) |
| 105 skps_dir = api.path['slave_build'].join('skps') | |
| 106 | 104 |
| 107 # Set build property to make finding SKPs convenient. | 105 # Set build property to make finding SKPs convenient. |
| 108 api.step.active_result.presentation.properties['Location of SKPs'] = ( | 106 api.step.active_result.presentation.properties['Location of SKPs'] = ( |
| 109 'https://pantheon.corp.google.com/storage/browser/%s/skps/%s/%s/' % ( | 107 'https://pantheon.corp.google.com/storage/browser/%s/skps/%s/%s/' % ( |
| 110 api.ct_swarming.CT_GS_BUCKET, ct_page_type, skps_chromium_build)) | 108 api.ct_swarming.CT_GS_BUCKET, ct_page_type, skps_chromium_build)) |
| 111 | 109 |
| 112 # Delete swarming_temp_dir to ensure it starts from a clean slate. | 110 # Delete swarming_temp_dir to ensure it starts from a clean slate. |
| 113 api.file.rmtree('swarming temp dir', api.ct_swarming.swarming_temp_dir) | 111 api.file.rmtree('swarming temp dir', api.ct_swarming.swarming_temp_dir) |
| 114 | 112 |
| 115 for slave_num in range(1, ct_num_slaves + 1): | 113 for slave_num in range(1, ct_num_slaves + 1): |
| 116 # Download SKPs. | 114 # Download SKPs. |
| 117 api.ct_swarming.download_skps( | 115 api.ct_swarming.download_skps( |
| 118 ct_page_type, slave_num, skps_chromium_build, skps_dir) | 116 ct_page_type, slave_num, skps_chromium_build, |
| 119 | 117 api.path['slave_build'].join('skps')) |
| 120 # Zip up the SKPs due to https://github.com/luci/luci-go/issues/9 | |
| 121 api.zip.directory(step_name='zip skps dir', | |
| 122 directory=skps_dir.join('slave%s' % slave_num), | |
| 123 output=skps_dir.join('slave%s.zip' % slave_num)) | |
| 124 | 118 |
| 125 # Create this slave's isolated.gen.json file to use for batcharchiving. | 119 # Create this slave's isolated.gen.json file to use for batcharchiving. |
| 126 isolate_dir = chromium_checkout.join('chrome') | 120 isolate_dir = chromium_checkout.join('chrome') |
| 127 isolate_path = isolate_dir.join(CT_SKPS_ISOLATE) | 121 isolate_path = isolate_dir.join(CT_SKPS_ISOLATE) |
| 128 extra_variables = { | 122 extra_variables = { |
| 129 'SLAVE_NUM': str(slave_num), | 123 'SLAVE_NUM': str(slave_num), |
| 130 'TOOL_NAME': skia_tool, | 124 'TOOL_NAME': skia_tool, |
| 131 'GIT_HASH': skia_hash, | 125 'GIT_HASH': skia_hash, |
| 132 'CONFIGURATION': configuration, | 126 'CONFIGURATION': configuration, |
| 133 } | 127 } |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 api.test('CT_DM_10k_SKPs_Trybot') + | 260 api.test('CT_DM_10k_SKPs_Trybot') + |
| 267 api.properties( | 261 api.properties( |
| 268 buildername= | 262 buildername= |
| 269 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-CT_DM_10k_SKPs-Trybot', | 263 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-CT_DM_10k_SKPs-Trybot', |
| 270 ct_num_slaves=ct_num_slaves, | 264 ct_num_slaves=ct_num_slaves, |
| 271 rietveld='codereview.chromium.org', | 265 rietveld='codereview.chromium.org', |
| 272 issue=1499623002, | 266 issue=1499623002, |
| 273 patchset=1, | 267 patchset=1, |
| 274 ) | 268 ) |
| 275 ) | 269 ) |
| OLD | NEW |