Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: infra/bots/recipes/swarm_compile.py

Issue 2215443003: [recipes] Increase test coverage (Closed) Base URL: https://skia.googlesource.com/skia.git@merge_buildbot_spec
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 'core', 10 'core',
(...skipping 10 matching lines...) Expand all
21 21
22 TEST_BUILDERS = { 22 TEST_BUILDERS = {
23 'client.skia.compile': { 23 'client.skia.compile': {
24 'skiabot-linux-swarm-000': [ 24 'skiabot-linux-swarm-000': [
25 'Build-Mac-Clang-Arm7-Debug-Android', 25 'Build-Mac-Clang-Arm7-Debug-Android',
26 'Build-Mac-Clang-Arm7-Release-iOS', 26 'Build-Mac-Clang-Arm7-Release-iOS',
27 'Build-Mac-Clang-x86_64-Debug-CommandBuffer', 27 'Build-Mac-Clang-x86_64-Debug-CommandBuffer',
28 'Build-Mac-Clang-x86_64-Release-CMake', 28 'Build-Mac-Clang-x86_64-Release-CMake',
29 'Build-Ubuntu-Clang-x86_64-Debug-GN', 29 'Build-Ubuntu-Clang-x86_64-Debug-GN',
30 'Build-Ubuntu-GCC-Arm7-Debug-Android-Trybot', 30 'Build-Ubuntu-GCC-Arm7-Debug-Android-Trybot',
31 #'Build-Ubuntu-GCC-Arm7-Debug-Android_FrameworkDefs', 31 'Build-Ubuntu-GCC-Arm7-Debug-Android_FrameworkDefs',
32 #'Build-Ubuntu-GCC-Arm7-Debug-Android_NoNeon', 32 'Build-Ubuntu-GCC-Arm7-Debug-Android_NoNeon',
33 'Build-Ubuntu-GCC-Arm7-Release-Android', 33 'Build-Ubuntu-GCC-Arm7-Release-Android',
34 'Build-Ubuntu-GCC-Arm7-Release-Android_Vulkan', 34 'Build-Ubuntu-GCC-Arm7-Release-Android_Vulkan',
35 'Build-Ubuntu-GCC-x86-Debug', 35 'Build-Ubuntu-GCC-x86-Debug',
36 'Build-Ubuntu-GCC-x86_64-Debug-MSAN', 36 'Build-Ubuntu-GCC-x86_64-Debug-MSAN',
37 'Build-Ubuntu-GCC-x86_64-Debug-GN', 37 'Build-Ubuntu-GCC-x86_64-Debug-GN',
38 #'Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE', 38 'Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE',
39 #'Build-Ubuntu-GCC-x86_64-Release-ANGLE', 39 'Build-Ubuntu-GCC-x86_64-Release-ANGLE',
40 'Build-Ubuntu-GCC-x86_64-Release-CMake', 40 'Build-Ubuntu-GCC-x86_64-Release-CMake',
41 #'Build-Ubuntu-GCC-x86_64-Release-Fast', 41 'Build-Ubuntu-GCC-x86_64-Release-Fast',
42 #'Build-Ubuntu-GCC-x86_64-Release-Mesa', 42 'Build-Ubuntu-GCC-x86_64-Release-Mesa',
43 'Build-Ubuntu-GCC-x86_64-Release-PDFium', 43 'Build-Ubuntu-GCC-x86_64-Release-PDFium',
44 'Build-Ubuntu-GCC-x86_64-Release-Shared', 44 'Build-Ubuntu-GCC-x86_64-Release-Shared',
45 'Build-Ubuntu-GCC-x86_64-Release-Valgrind', 45 'Build-Ubuntu-GCC-x86_64-Release-Valgrind',
46 'Build-Win-MSVC-x86-Debug', 46 'Build-Win-MSVC-x86-Debug',
47 #'Build-Win-MSVC-x86-Debug-Exceptions', 47 'Build-Win-MSVC-x86-Debug-Exceptions',
48 #'Build-Win-MSVC-x86-Release-GDI', 48 'Build-Win-MSVC-x86-Release-GDI',
49 'Build-Win-MSVC-x86-Release-GN', 49 'Build-Win-MSVC-x86-Release-GN',
50 'Build-Win-MSVC-x86_64-Release-Vulkan', 50 'Build-Win-MSVC-x86_64-Release-Vulkan',
51 ], 51 ],
52 }, 52 },
53 } 53 }
54 54
55 55
56 def build_targets_from_builder_dict(builder_dict): 56 def build_targets_from_builder_dict(builder_dict):
57 """Return a list of targets to build, depending on the builder type.""" 57 """Return a list of targets to build, depending on the builder type."""
58 if builder_dict.get('extra_config') == 'iOS': 58 if builder_dict.get('extra_config') == 'iOS':
59 return ['iOSShell'] 59 return ['iOSShell']
60 if 'SAN' in builder_dict.get('extra_config', ''): 60 if 'SAN' in builder_dict.get('extra_config', ''):
61 # 'most' does not compile under MSAN. 61 # 'most' does not compile under MSAN.
62 return ['dm', 'nanobench'] 62 return ['dm', 'nanobench']
63 else: 63 else:
64 return ['most'] 64 return ['most']
65 65
66 66
67 def get_extra_env_vars(builder_dict): 67 def get_extra_env_vars(builder_dict):
68 env = {} 68 env = {}
69 if builder_dict.get('compiler') == 'Clang': 69 if builder_dict.get('compiler') == 'Clang':
70 env['CC'] = '/usr/bin/clang' 70 env['CC'] = '/usr/bin/clang'
71 env['CXX'] = '/usr/bin/clang++' 71 env['CXX'] = '/usr/bin/clang++'
72 72
73 # SKNX_NO_SIMD, SK_USE_DISCARDABLE_SCALEDIMAGECACHE, etc. 73 # SKNX_NO_SIMD, SK_USE_DISCARDABLE_SCALEDIMAGECACHE, etc.
74 extra_config = builder_dict.get('extra_config', '') 74 extra_config = builder_dict.get('extra_config', '')
75 if extra_config.startswith('SK') and extra_config.isupper(): 75 if extra_config.startswith('SK') and extra_config.isupper():
76 env['CPPFLAGS'] = '-D' + extra_config # pragma: no cover 76 env['CPPFLAGS'] = '-D' + extra_config
77 77
78 return env 78 return env
79 79
80 80
81 def get_gyp_defines(builder_dict): 81 def get_gyp_defines(builder_dict):
82 gyp_defs = {} 82 gyp_defs = {}
83 83
84 # skia_arch_type. 84 # skia_arch_type.
85 arch = builder_dict['target_arch'] 85 arch = builder_dict['target_arch']
86 86
(...skipping 13 matching lines...) Expand all
100 werr = False 100 werr = False
101 if 'Win' in builder_dict.get('os', ''): 101 if 'Win' in builder_dict.get('os', ''):
102 if not ('GDI' in builder_dict.get('extra_config', '') or 102 if not ('GDI' in builder_dict.get('extra_config', '') or
103 'Exceptions' in builder_dict.get('extra_config', '')): 103 'Exceptions' in builder_dict.get('extra_config', '')):
104 werr = True 104 werr = True
105 elif ('Mac' in builder_dict.get('os', '') and 105 elif ('Mac' in builder_dict.get('os', '') and
106 'Android' in builder_dict.get('extra_config', '')): 106 'Android' in builder_dict.get('extra_config', '')):
107 werr = False 107 werr = False
108 elif 'Fast' in builder_dict.get('extra_config', ''): 108 elif 'Fast' in builder_dict.get('extra_config', ''):
109 # See https://bugs.chromium.org/p/skia/issues/detail?id=5257 109 # See https://bugs.chromium.org/p/skia/issues/detail?id=5257
110 werr = False # pragma: no cover 110 werr = False
111 else: 111 else:
112 werr = True 112 werr = True
113 gyp_defs['skia_warnings_as_errors'] = str(int(werr)) # True/False -> '1'/'0' 113 gyp_defs['skia_warnings_as_errors'] = str(int(werr)) # True/False -> '1'/'0'
114 114
115 # Win debugger. 115 # Win debugger.
116 if 'Win' in builder_dict.get('os', ''): 116 if 'Win' in builder_dict.get('os', ''):
117 gyp_defs['skia_win_debuggers_path'] = 'c:/DbgHelp' 117 gyp_defs['skia_win_debuggers_path'] = 'c:/DbgHelp'
118 118
119 # Qt SDK (Win). 119 # Qt SDK (Win).
120 if 'Win' in builder_dict.get('os', ''): 120 if 'Win' in builder_dict.get('os', ''):
121 gyp_defs['qt_sdk'] = 'C:/Qt/4.8.5/' 121 gyp_defs['qt_sdk'] = 'C:/Qt/4.8.5/'
122 122
123 # ANGLE. 123 # ANGLE.
124 if builder_dict.get('extra_config') == 'ANGLE': # pragma: no cover 124 if builder_dict.get('extra_config') == 'ANGLE':
125 gyp_defs['skia_angle'] = '1' 125 gyp_defs['skia_angle'] = '1'
126 if builder_dict.get('os', '') in ('Ubuntu', 'Linux'): 126 if builder_dict.get('os', '') in ('Ubuntu', 'Linux'):
127 gyp_defs['use_x11'] = '1' 127 gyp_defs['use_x11'] = '1'
128 gyp_defs['chromeos'] = '0' 128 gyp_defs['chromeos'] = '0'
129 129
130 # GDI. 130 # GDI.
131 if builder_dict.get('extra_config') == 'GDI': 131 if builder_dict.get('extra_config') == 'GDI':
132 gyp_defs['skia_gdi'] = '1' # pragma: no cover 132 gyp_defs['skia_gdi'] = '1'
133 133
134 # Build with Exceptions on Windows. 134 # Build with Exceptions on Windows.
135 if ('Win' in builder_dict.get('os', '') and 135 if ('Win' in builder_dict.get('os', '') and
136 builder_dict.get('extra_config') == 'Exceptions'): 136 builder_dict.get('extra_config') == 'Exceptions'):
137 gyp_defs['skia_win_exceptions'] = '1' # pragma: no cover 137 gyp_defs['skia_win_exceptions'] = '1'
138 138
139 # iOS. 139 # iOS.
140 if (builder_dict.get('os') == 'iOS' or 140 if (builder_dict.get('os') == 'iOS' or
141 builder_dict.get('extra_config') == 'iOS'): 141 builder_dict.get('extra_config') == 'iOS'):
142 gyp_defs['skia_os'] = 'ios' 142 gyp_defs['skia_os'] = 'ios'
143 143
144 # Shared library build. 144 # Shared library build.
145 if builder_dict.get('extra_config') == 'Shared': 145 if builder_dict.get('extra_config') == 'Shared':
146 gyp_defs['skia_shared_lib'] = '1' 146 gyp_defs['skia_shared_lib'] = '1'
147 147
148 # Build fastest Skia possible. 148 # Build fastest Skia possible.
149 if builder_dict.get('extra_config') == 'Fast': 149 if builder_dict.get('extra_config') == 'Fast':
150 gyp_defs['skia_fast'] = '1' # pragma: no cover 150 gyp_defs['skia_fast'] = '1'
151
152 # PDF viewer in GM.
153 if (builder_dict.get('os') == 'Mac10.8' and
154 builder_dict.get('arch') == 'x86_64' and
155 builder_dict.get('configuration') == 'Release'): # pragma: no cover
156 gyp_defs['skia_run_pdfviewer_in_gm'] = '1'
157 151
158 # Clang. 152 # Clang.
159 if builder_dict.get('compiler') == 'Clang': 153 if builder_dict.get('compiler') == 'Clang':
160 gyp_defs['skia_clang_build'] = '1' 154 gyp_defs['skia_clang_build'] = '1'
161 155
162 # Valgrind. 156 # Valgrind.
163 if 'Valgrind' in builder_dict.get('extra_config', ''): 157 if 'Valgrind' in builder_dict.get('extra_config', ''):
164 gyp_defs['skia_release_optimization_level'] = '1' 158 gyp_defs['skia_release_optimization_level'] = '1'
165 159
166 # Link-time code generation just wastes time on compile-only bots. 160 # Link-time code generation just wastes time on compile-only bots.
167 if builder_dict.get('compiler') == 'MSVC': 161 if builder_dict.get('compiler') == 'MSVC':
168 gyp_defs['skia_win_ltcg'] = '0' 162 gyp_defs['skia_win_ltcg'] = '0'
169 163
170 # Mesa. 164 # Mesa.
171 if (builder_dict.get('extra_config') == 'Mesa' or 165 if (builder_dict.get('extra_config') == 'Mesa' or
172 builder_dict.get('cpu_or_gpu_value') == 'Mesa'): 166 builder_dict.get('cpu_or_gpu_value') == 'Mesa'):
173 gyp_defs['skia_mesa'] = '1' # pragma: no cover 167 gyp_defs['skia_mesa'] = '1'
174 168
175 # skia_use_android_framework_defines. 169 # skia_use_android_framework_defines.
176 if builder_dict.get('extra_config') == 'Android_FrameworkDefs': 170 if builder_dict.get('extra_config') == 'Android_FrameworkDefs':
177 gyp_defs['skia_use_android_framework_defines'] = '1' # pragma: no cover 171 gyp_defs['skia_use_android_framework_defines'] = '1'
178 172
179 # CommandBuffer. 173 # CommandBuffer.
180 if builder_dict.get('extra_config') == 'CommandBuffer': 174 if builder_dict.get('extra_config') == 'CommandBuffer':
181 gyp_defs['skia_command_buffer'] = '1' 175 gyp_defs['skia_command_buffer'] = '1'
182 176
183 # Vulkan. 177 # Vulkan.
184 if builder_dict.get('extra_config') == 'Vulkan': 178 if builder_dict.get('extra_config') == 'Vulkan':
185 gyp_defs['skia_vulkan'] = '1' 179 gyp_defs['skia_vulkan'] = '1'
186 gyp_defs['skia_vulkan_debug_layers'] = '0' 180 gyp_defs['skia_vulkan_debug_layers'] = '0'
187 181
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 path_config='kitchen', 302 path_config='kitchen',
309 swarm_out_dir='[SWARM_OUT_DIR]', 303 swarm_out_dir='[SWARM_OUT_DIR]',
310 rietveld='https://codereview.chromium.org', 304 rietveld='https://codereview.chromium.org',
311 patchset=1, 305 patchset=1,
312 issue=2147533002L) + 306 issue=2147533002L) +
313 api.path.exists( 307 api.path.exists(
314 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') 308 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt')
315 ) + 309 ) +
316 api.platform('win', 64) 310 api.platform('win', 64)
317 ) 311 )
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698