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

Side by Side Diff: scripts/slave/recipes/pdfium.py

Issue 2380553002: Enable goma on pdfium buildbots by default. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | scripts/slave/recipes/pdfium.expected/android.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 DEPS = [ 5 DEPS = [
6 'depot_tools/gclient', 6 'depot_tools/gclient',
7 'depot_tools/bot_update', 7 'depot_tools/bot_update',
8 'goma',
8 'recipe_engine/path', 9 'recipe_engine/path',
9 'recipe_engine/platform', 10 'recipe_engine/platform',
10 'recipe_engine/properties', 11 'recipe_engine/properties',
11 'recipe_engine/python', 12 'recipe_engine/python',
12 'recipe_engine/step', 13 'recipe_engine/step',
13 ] 14 ]
14 15
15 from recipe_engine.recipe_api import Property 16 from recipe_engine.recipe_api import Property
16 17
17 PROPERTIES = { 18 PROPERTIES = {
(...skipping 29 matching lines...) Expand all
47 out_dir += "_v8" 48 out_dir += "_v8"
48 if clang: 49 if clang:
49 out_dir += "_clang" 50 out_dir += "_clang"
50 if memory_tool == 'asan': 51 if memory_tool == 'asan':
51 out_dir += "_asan" 52 out_dir += "_asan"
52 return out_dir 53 return out_dir
53 54
54 55
55 def _GNGenBuilds(api, memory_tool, skia, xfa, v8, target_cpu, clang, rel, 56 def _GNGenBuilds(api, memory_tool, skia, xfa, v8, target_cpu, clang, rel,
56 target_os, out_dir): 57 target_os, out_dir):
58 api.goma.ensure_goma()
57 gn_bool = {True: 'true', False: 'false'} 59 gn_bool = {True: 'true', False: 'false'}
58 # Generate build files by GN. 60 # Generate build files by GN.
59 checkout = api.path['checkout'] 61 checkout = api.path['checkout']
60 gn_cmd = api.path['depot_tools'].join('gn.py') 62 gn_cmd = api.path['depot_tools'].join('gn.py')
61 63
62 # Prepare the arguments to pass in. 64 # Prepare the arguments to pass in.
63 args = [ 65 args = [
64 'is_debug=%s' % gn_bool[not rel], 66 'is_debug=%s' % gn_bool[not rel],
65 'is_component_build=false', 67 'is_component_build=false',
66 'pdf_enable_v8=%s' % gn_bool[v8], 68 'pdf_enable_v8=%s' % gn_bool[v8],
67 'pdf_enable_xfa=%s' % gn_bool[xfa], 69 'pdf_enable_xfa=%s' % gn_bool[xfa],
68 'pdf_use_skia=%s' % gn_bool[skia], 70 'pdf_use_skia=%s' % gn_bool[skia],
69 'pdf_is_standalone=true', 71 'pdf_is_standalone=true',
72 'use_goma=true',
73 'goma_dir="%s"' % api.goma.goma_dir,
70 ] 74 ]
71 if api.platform.is_win and not memory_tool: 75 if api.platform.is_win and not memory_tool:
72 args.append('symbol_level=1') 76 args.append('symbol_level=1')
73 if api.platform.is_linux: 77 if api.platform.is_linux:
74 args.append('use_sysroot=false') 78 args.append('use_sysroot=false')
75 if clang: 79 if clang:
76 args.append('is_clang=true') 80 args.append('is_clang=true')
77 if memory_tool == 'asan': 81 if memory_tool == 'asan':
78 args.append('is_asan=true is_lsan=true') 82 args.append('is_asan=true is_lsan=true')
79 if target_os: 83 if target_os:
80 args.append('target_os="%s"' % target_os) 84 args.append('target_os="%s"' % target_os)
81 if target_cpu == 'x86': 85 if target_cpu == 'x86':
82 args.append('target_cpu="x86"') 86 args.append('target_cpu="x86"')
83 87
84 api.python('gn gen', gn_cmd, 88 api.python('gn gen', gn_cmd,
85 ['--root=' + str(checkout), 'gen', '//out/' + out_dir, 89 ['--root=' + str(checkout), 'gen', '//out/' + out_dir,
86 '--args=' + ' '.join(args)], 90 '--args=' + ' '.join(args)],
87 cwd=checkout) 91 cwd=checkout)
88 92
89 def _BuildSteps(api, out_dir): 93 def _BuildSteps(api, clang, out_dir):
90 # Build sample file using Ninja 94 # Build sample file using Ninja
91 debug_path = api.path['checkout'].join('out', out_dir) 95 debug_path = api.path['checkout'].join('out', out_dir)
92 api.step('compile with ninja', ['ninja', '-C', debug_path]) 96 ninja_cmd = ['ninja', '-C', debug_path,
97 '-j', api.goma.recommended_goma_jobs]
98
99 with api.goma.build_with_goma(
100 ninja_log_outdir=debug_path,
101 ninja_log_compiler='clang' if clang else 'unknown',
102 ninja_log_command=ninja_cmd):
103 api.step('compile with ninja', ninja_cmd)
93 104
94 105
95 def _RunDrMemoryTests(api, v8): 106 def _RunDrMemoryTests(api, v8):
96 pdfium_tests_py = str(api.path['checkout'].join('tools', 107 pdfium_tests_py = str(api.path['checkout'].join('tools',
97 'drmemory', 108 'drmemory',
98 'scripts', 109 'scripts',
99 'pdfium_tests.py')) 110 'pdfium_tests.py'))
100 api.python('unittests', pdfium_tests_py, 111 api.python('unittests', pdfium_tests_py,
101 args=['--test', 'pdfium_unittests'], 112 args=['--test', 'pdfium_unittests'],
102 cwd=api.path['checkout']) 113 cwd=api.path['checkout'])
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 171
161 def RunSteps(api, memory_tool, skia, xfa, v8, target_cpu, clang, rel, skip_test, 172 def RunSteps(api, memory_tool, skia, xfa, v8, target_cpu, clang, rel, skip_test,
162 target_os): 173 target_os):
163 _CheckoutSteps(api, memory_tool, skia, xfa, v8, target_cpu, clang, target_os) 174 _CheckoutSteps(api, memory_tool, skia, xfa, v8, target_cpu, clang, target_os)
164 175
165 out_dir = _OutPath(api, memory_tool, skia, xfa, v8, clang, rel) 176 out_dir = _OutPath(api, memory_tool, skia, xfa, v8, clang, rel)
166 177
167 _GNGenBuilds(api, memory_tool, skia, xfa, v8, target_cpu, clang, rel, 178 _GNGenBuilds(api, memory_tool, skia, xfa, v8, target_cpu, clang, rel,
168 target_os, out_dir) 179 target_os, out_dir)
169 180
170 _BuildSteps(api, out_dir) 181 _BuildSteps(api, clang, out_dir)
171 182
172 if skip_test: 183 if skip_test:
173 return 184 return
174 185
175 with api.step.defer_results(): 186 with api.step.defer_results():
176 _RunTests(api, memory_tool, v8, out_dir) 187 _RunTests(api, memory_tool, v8, out_dir)
177 188
178 189
179 def GenTests(api): 190 def GenTests(api):
180 yield ( 191 yield (
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 397
387 yield ( 398 yield (
388 api.test('android') + 399 api.test('android') +
389 api.platform('linux', 64) + 400 api.platform('linux', 64) +
390 api.properties(mastername='client.pdfium', 401 api.properties(mastername='client.pdfium',
391 buildername='android', 402 buildername='android',
392 slavename='test_slave', 403 slavename='test_slave',
393 target_os='android', 404 target_os='android',
394 skip_test=True) 405 skip_test=True)
395 ) 406 )
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/pdfium.expected/android.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698