Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 | 5 |
| 6 # Recipe module for Skia Swarming compile. | 6 # Recipe module for Skia Swarming compile. |
| 7 | 7 |
| 8 | 8 |
| 9 DEPS = [ | 9 DEPS = [ |
| 10 'recipe_engine/json', | 10 'recipe_engine/json', |
| 11 'recipe_engine/path', | 11 'recipe_engine/path', |
| 12 'recipe_engine/platform', | 12 'recipe_engine/platform', |
| 13 'recipe_engine/properties', | 13 'recipe_engine/properties', |
| 14 'recipe_engine/python', | |
| 14 'skia', | 15 'skia', |
| 16 'flavor', | |
| 17 'run', | |
| 18 'vars', | |
| 15 ] | 19 ] |
| 16 | 20 |
| 17 | 21 |
| 18 TEST_BUILDERS = { | 22 TEST_BUILDERS = { |
| 19 'client.skia.compile': { | 23 'client.skia.compile': { |
| 20 'skiabot-linux-swarm-000': [ | 24 'skiabot-linux-swarm-000': [ |
| 21 'Build-Mac-Clang-Arm7-Debug-Android', | 25 'Build-Mac-Clang-Arm7-Debug-Android', |
| 22 'Build-Mac-Clang-Arm7-Release-iOS', | 26 'Build-Mac-Clang-Arm7-Release-iOS', |
| 23 'Build-Mac-Clang-x86_64-Debug-CommandBuffer', | 27 'Build-Mac-Clang-x86_64-Debug-CommandBuffer', |
| 24 'Build-Mac-Clang-x86_64-Release-CMake', | 28 'Build-Mac-Clang-x86_64-Release-CMake', |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 36 'Build-Win-MSVC-x86-Debug', | 40 'Build-Win-MSVC-x86-Debug', |
| 37 'Build-Win-MSVC-x86-Release-GN', | 41 'Build-Win-MSVC-x86-Release-GN', |
| 38 'Build-Win-MSVC-x86_64-Release-Vulkan', | 42 'Build-Win-MSVC-x86_64-Release-Vulkan', |
| 39 ], | 43 ], |
| 40 }, | 44 }, |
| 41 } | 45 } |
| 42 | 46 |
| 43 | 47 |
| 44 def RunSteps(api): | 48 def RunSteps(api): |
| 45 api.skia.setup() | 49 api.skia.setup() |
| 46 api.skia.compile_steps() | 50 |
| 51 try: | |
| 52 for target in api.vars.build_targets: | |
| 53 api.flavor.compile(target) | |
| 54 api.run.copy_build_products( | |
| 55 api.flavor.out_dir, | |
| 56 api.vars.swarming_out_dir.join( | |
| 57 'out', api.vars.configuration)) | |
| 58 api.flavor.copy_extra_build_products(api.vars.swarming_out_dir) | |
| 59 finally: | |
| 60 if 'Win' in api.vars.builder_cfg.get('os', ''): | |
| 61 api.python.inline( | |
| 62 name='cleanup', | |
| 63 program='''import psutil | |
| 64 for p in psutil.process_iter(): | |
| 65 try: | |
| 66 if p.name in ('mspdbsrv.exe', 'vctip.exe', 'cl.exe', 'link.exe'): | |
| 67 p.kill() | |
| 68 except psutil._error.AccessDenied: | |
| 69 pass | |
| 70 ''', | |
| 71 infra_step=True) | |
| 72 | |
| 47 api.skia.cleanup_steps() | 73 api.skia.cleanup_steps() |
| 48 api.skia.check_failure() | 74 api.run.check_failure() |
| 49 | 75 |
| 50 | 76 |
| 51 def GenTests(api): | 77 def GenTests(api): |
| 52 for mastername, slaves in TEST_BUILDERS.iteritems(): | 78 for mastername, slaves in TEST_BUILDERS.iteritems(): |
| 53 for slavename, builders_by_slave in slaves.iteritems(): | 79 for slavename, builders_by_slave in slaves.iteritems(): |
| 54 for builder in builders_by_slave: | 80 for builder in builders_by_slave: |
| 55 test = ( | 81 test = ( |
| 56 api.test(builder) + | 82 api.test(builder) + |
| 57 api.properties(buildername=builder, | 83 api.properties(buildername=builder, |
| 58 mastername=mastername, | 84 mastername=mastername, |
| 59 slavename=slavename, | 85 slavename=slavename, |
| 60 buildnumber=5, | 86 buildnumber=5, |
| 61 revision='abc123', | 87 revision='abc123', |
| 62 path_config='kitchen', | 88 #path_config='kitchen', |
|
rmistry
2016/08/03 14:15:16
Commented out?
borenet
2016/08/03 14:30:00
Fixed.
| |
| 63 swarm_out_dir='[SWARM_OUT_DIR]') + | 89 swarm_out_dir='[SWARM_OUT_DIR]') + |
| 64 api.path.exists( | 90 api.path.exists( |
| 65 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') | 91 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 66 ) | 92 ) |
| 67 ) | 93 ) |
| 68 if 'Win' in builder: | 94 if 'Win' in builder: |
| 69 test += api.platform('win', 64) | 95 test += api.platform('win', 64) |
| 70 elif 'Mac' in builder: | 96 elif 'Mac' in builder: |
| 71 test += api.platform('mac', 64) | 97 test += api.platform('mac', 64) |
| 72 else: | 98 else: |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 path_config='kitchen', | 157 path_config='kitchen', |
| 132 swarm_out_dir='[SWARM_OUT_DIR]', | 158 swarm_out_dir='[SWARM_OUT_DIR]', |
| 133 rietveld='https://codereview.chromium.org', | 159 rietveld='https://codereview.chromium.org', |
| 134 patchset=1, | 160 patchset=1, |
| 135 issue=2147533002L) + | 161 issue=2147533002L) + |
| 136 api.path.exists( | 162 api.path.exists( |
| 137 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') | 163 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 138 ) + | 164 ) + |
| 139 api.platform('win', 64) | 165 api.platform('win', 64) |
| 140 ) | 166 ) |
| OLD | NEW |