OLD | NEW |
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 gn_cmd = api.path['depot_tools'].join('gn.py') | 61 gn_cmd = api.path['depot_tools'].join('gn.py') |
61 | 62 |
62 # Prepare the arguments to pass in. | 63 # Prepare the arguments to pass in. |
63 args = [ | 64 args = [ |
64 'is_debug=%s' % gn_bool[not rel], | 65 'is_debug=%s' % gn_bool[not rel], |
65 'is_component_build=false', | 66 'is_component_build=false', |
66 'pdf_enable_v8=%s' % gn_bool[v8], | 67 'pdf_enable_v8=%s' % gn_bool[v8], |
67 'pdf_enable_xfa=%s' % gn_bool[xfa], | 68 'pdf_enable_xfa=%s' % gn_bool[xfa], |
68 'pdf_use_skia=%s' % gn_bool[skia], | 69 'pdf_use_skia=%s' % gn_bool[skia], |
69 'pdf_is_standalone=true', | 70 'pdf_is_standalone=true', |
| 71 'use_goma=true', |
70 ] | 72 ] |
71 if api.platform.is_win and not memory_tool: | 73 if api.platform.is_win and not memory_tool: |
72 args.append('symbol_level=1') | 74 args.append('symbol_level=1') |
73 if api.platform.is_linux: | 75 if api.platform.is_linux: |
74 args.append('use_sysroot=false') | 76 args.append('use_sysroot=false') |
75 if clang: | 77 if clang: |
76 args.append('is_clang=true') | 78 args.append('is_clang=true') |
77 if memory_tool == 'asan': | 79 if memory_tool == 'asan': |
78 args.append('is_asan=true') | 80 args.append('is_asan=true') |
79 if target_os: | 81 if target_os: |
80 args.append('target_os="%s"' % target_os) | 82 args.append('target_os="%s"' % target_os) |
81 if target_cpu == 'x86': | 83 if target_cpu == 'x86': |
82 args.append('target_cpu="x86"') | 84 args.append('target_cpu="x86"') |
83 | 85 |
84 api.python('gn gen', gn_cmd, | 86 api.python('gn gen', gn_cmd, |
85 ['--root=' + str(checkout), 'gen', '//out/' + out_dir, | 87 ['--root=' + str(checkout), 'gen', '//out/' + out_dir, |
86 '--args=' + ' '.join(args)], | 88 '--args=' + ' '.join(args)], |
87 cwd=checkout) | 89 cwd=checkout) |
88 | 90 |
89 def _BuildSteps(api, out_dir): | 91 def _BuildSteps(api, clang, out_dir): |
| 92 api.goma.ensure_goma() |
| 93 |
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 172 |
162 def RunSteps(api, memory_tool, skia, xfa, v8, target_cpu, clang, rel, skip_test, | 173 def RunSteps(api, memory_tool, skia, xfa, v8, target_cpu, clang, rel, skip_test, |
163 target_os): | 174 target_os): |
164 _CheckoutSteps(api, memory_tool, skia, xfa, v8, target_cpu, clang, target_os) | 175 _CheckoutSteps(api, memory_tool, skia, xfa, v8, target_cpu, clang, target_os) |
165 | 176 |
166 out_dir = _OutPath(api, memory_tool, skia, xfa, v8, clang, rel) | 177 out_dir = _OutPath(api, memory_tool, skia, xfa, v8, clang, rel) |
167 | 178 |
168 _GNGenBuilds(api, memory_tool, skia, xfa, v8, target_cpu, clang, rel, | 179 _GNGenBuilds(api, memory_tool, skia, xfa, v8, target_cpu, clang, rel, |
169 target_os, out_dir) | 180 target_os, out_dir) |
170 | 181 |
171 _BuildSteps(api, out_dir) | 182 _BuildSteps(api, clang, out_dir) |
172 | 183 |
173 if skip_test: | 184 if skip_test: |
174 return | 185 return |
175 | 186 |
176 with api.step.defer_results(): | 187 with api.step.defer_results(): |
177 _RunTests(api, memory_tool, v8, out_dir) | 188 _RunTests(api, memory_tool, v8, out_dir) |
178 | 189 |
179 | 190 |
180 def GenTests(api): | 191 def GenTests(api): |
181 yield ( | 192 yield ( |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 | 398 |
388 yield ( | 399 yield ( |
389 api.test('android') + | 400 api.test('android') + |
390 api.platform('linux', 64) + | 401 api.platform('linux', 64) + |
391 api.properties(mastername='client.pdfium', | 402 api.properties(mastername='client.pdfium', |
392 buildername='android', | 403 buildername='android', |
393 slavename='test_slave', | 404 slavename='test_slave', |
394 target_os='android', | 405 target_os='android', |
395 skip_test=True) | 406 skip_test=True) |
396 ) | 407 ) |
OLD | NEW |