| 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 from recipe_engine.types import freeze | 5 from recipe_engine.types import freeze |
| 6 | 6 |
| 7 DEPS = [ | 7 DEPS = [ |
| 8 'depot_tools/bot_update', | 8 'depot_tools/bot_update', |
| 9 'chromium', | 9 'chromium', |
| 10 'commit_position', | 10 'commit_position', |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 # Remove the llvm-build directory, so that gclient runhooks will download | 134 # Remove the llvm-build directory, so that gclient runhooks will download |
| 135 # the pre-built clang binary and not use the locally compiled binary from | 135 # the pre-built clang binary and not use the locally compiled binary from |
| 136 # the 'compile translation_unit clang tool' step. | 136 # the 'compile translation_unit clang tool' step. |
| 137 api.file.rmtree('llvm-build', | 137 api.file.rmtree('llvm-build', |
| 138 api.path['checkout'].join('third_party', 'llvm-build')) | 138 api.path['checkout'].join('third_party', 'llvm-build')) |
| 139 | 139 |
| 140 debug_path = api.path['checkout'].join('out', 'Debug') | 140 debug_path = api.path['checkout'].join('out', 'Debug') |
| 141 targets = bot_config.get('compile_targets', []) | 141 targets = bot_config.get('compile_targets', []) |
| 142 api.chromium.set_config('codesearch', BUILD_CONFIG='Debug') | 142 api.chromium.set_config('codesearch', BUILD_CONFIG='Debug') |
| 143 api.chromium.ensure_goma() | |
| 144 api.chromium.runhooks() | 143 api.chromium.runhooks() |
| 145 | 144 |
| 146 result = GenerateCompilationDatabase(api, debug_path, targets, platform) | 145 result = GenerateCompilationDatabase(api, debug_path, targets, platform) |
| 147 | 146 |
| 148 try: | 147 try: |
| 149 api.chromium.compile(targets) | 148 api.chromium.compile(targets) |
| 150 except api.step.StepFailure as f: # pragma: no cover | 149 except api.step.StepFailure as f: # pragma: no cover |
| 151 # Even if compilation fails, the Grok indexer may still be able to extract | 150 # Even if compilation fails, the Grok indexer may still be able to extract |
| 152 # (almost) all cross references. And the downside of failing on compile | 151 # (almost) all cross references. And the downside of failing on compile |
| 153 # error is that Codesearch gets stale. | 152 # error is that Codesearch gets stale. |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 api.test( | 256 api.test( |
| 258 'full_%s_fail' % _sanitize_nonalpha('ChromiumOS Codesearch')) + | 257 'full_%s_fail' % _sanitize_nonalpha('ChromiumOS Codesearch')) + |
| 259 api.step_data('generate compilation database for chromeos', | 258 api.step_data('generate compilation database for chromeos', |
| 260 stdout=api.raw_io.output('some compilation data')) + | 259 stdout=api.raw_io.output('some compilation data')) + |
| 261 api.step_data('generate compilation database for linux', | 260 api.step_data('generate compilation database for linux', |
| 262 stdout=api.raw_io.output('some compilation data')) + | 261 stdout=api.raw_io.output('some compilation data')) + |
| 263 api.step_data('run translation_unit clang tool', retcode=2) + | 262 api.step_data('run translation_unit clang tool', retcode=2) + |
| 264 api.properties.generic(buildername='ChromiumOS Codesearch', | 263 api.properties.generic(buildername='ChromiumOS Codesearch', |
| 265 mastername='chromium.infra.cron') | 264 mastername='chromium.infra.cron') |
| 266 ) | 265 ) |
| OLD | NEW |