| # Copyright 2019 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| from recipe_engine.recipe_api import Property |
| |
| DEPS = [ |
| 'fuchsia/symbolize', |
| 'recipe_engine/properties', |
| 'recipe_engine/step', |
| ] |
| |
| PROPERTIES = { |
| 'symbolize_tool': |
| Property( |
| kind=str, |
| help='Passed through symbolizer.__call__().', |
| default='symbolize-tool'), |
| 'llvm_symbolizer': |
| Property( |
| kind=str, |
| help='Passed through symbolizer.__call__().', |
| default='llvm-symbolizer'), |
| 'data': |
| Property( |
| kind=str, |
| help='Passed through symbolizer.__call__().', |
| default='path/to/data'), |
| 'level': |
| Property( |
| kind=str, |
| help='Passed through symbolizer.__call__().', |
| default='up'), |
| 'build_id_dirs': |
| Property( |
| kind=list, |
| help='Passed through symbolizer.__call__().', |
| default=()), |
| 'debug_symbol_gcs_bucket': |
| Property( |
| kind=str, |
| help='Passed through symbolizer.__call__().', |
| default=None), |
| 'symbolizer_output': |
| Property( |
| kind=str, |
| help='Passed through symbolizer.__call__().', |
| default=None), |
| 'json_output': |
| Property( |
| kind=str, |
| help='Passed through symbolizer.__call__().', |
| default='path/to/symbolizer-output.json'), |
| } # yapf: disable |
| |
| |
| def RunSteps(api, symbolize_tool, llvm_symbolizer, data, level, build_id_dirs, |
| debug_symbol_gcs_bucket, symbolizer_output, json_output): |
| # Need to nest because symbolize requires a parent step. (The parent |
| # step does not need to be read in but is required nonetheless.) |
| with api.step.nest('nest') as presentation: |
| api.symbolize( |
| symbolize_tool=symbolize_tool, |
| llvm_symbolizer=llvm_symbolizer, |
| data=data, |
| level=level, |
| build_id_dirs=build_id_dirs, |
| debug_symbol_gcs_bucket=debug_symbol_gcs_bucket, |
| symbolizer_output=symbolizer_output, |
| json_output=json_output, |
| presentation=presentation) |
| |
| |
| def GenTests(api): |
| yield api.test('debug_symbol_gcs_bucket') + api.properties( |
| debug_symbol_gcs_bucket='debug-symbols') |
| |
| yield api.test('build_id_dirs') + api.properties(build_id_dirs=list('abcde')) |
| |
| yield api.test('no_level') + api.properties( |
| debug_symbol_gcs_bucket='debug-symbols', level='') |