| 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 'archive', | 8 'archive', |
| 9 'depot_tools/bot_update', | 9 'depot_tools/bot_update', |
| 10 'depot_tools/infra_paths', | |
| 11 'chromium', | 10 'chromium', |
| 12 'file', | 11 'file', |
| 13 'recipe_engine/json', | 12 'recipe_engine/json', |
| 14 'recipe_engine/path', | 13 'recipe_engine/path', |
| 15 'recipe_engine/platform', | 14 'recipe_engine/platform', |
| 16 'recipe_engine/properties', | 15 'recipe_engine/properties', |
| 17 'recipe_engine/python', | 16 'recipe_engine/python', |
| 18 'recipe_engine/raw_io', | 17 'recipe_engine/raw_io', |
| 19 'recipe_engine/step', | 18 'recipe_engine/step', |
| 20 ] | 19 ] |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 }, | 60 }, |
| 62 }, | 61 }, |
| 63 }) | 62 }) |
| 64 | 63 |
| 65 | 64 |
| 66 def gn_refs(api, step_name, args): | 65 def gn_refs(api, step_name, args): |
| 67 """Runs gn refs with given additional arguments. | 66 """Runs gn refs with given additional arguments. |
| 68 Returns: the list of matched targets. | 67 Returns: the list of matched targets. |
| 69 """ | 68 """ |
| 70 step_result = api.python(step_name, | 69 step_result = api.python(step_name, |
| 71 api.infra_paths['depot_tools'].join('gn.py'), | 70 api.path['depot_tools'].join('gn.py'), |
| 72 ['--root=%s' % str(api.path['checkout']), | 71 ['--root=%s' % str(api.path['checkout']), |
| 73 'refs', | 72 'refs', |
| 74 str(api.chromium.output_dir), | 73 str(api.chromium.output_dir), |
| 75 ] + args, | 74 ] + args, |
| 76 stdout=api.raw_io.output()) | 75 stdout=api.raw_io.output()) |
| 77 return step_result.stdout.split() | 76 return step_result.stdout.split() |
| 78 | 77 |
| 79 | 78 |
| 80 def RunSteps(api): | 79 def RunSteps(api): |
| 81 mastername = api.m.properties['mastername'] | 80 mastername = api.m.properties['mastername'] |
| (...skipping 19 matching lines...) Expand all Loading... |
| 101 '--type=executable', | 100 '--type=executable', |
| 102 '--as=output', | 101 '--as=output', |
| 103 '//testing/libfuzzer:no_clusterfuzz']) | 102 '//testing/libfuzzer:no_clusterfuzz']) |
| 104 targets = list(set(all_fuzzers).difference(set(no_clusterfuzz))) | 103 targets = list(set(all_fuzzers).difference(set(no_clusterfuzz))) |
| 105 api.step.active_result.presentation.logs['all_fuzzers'] = all_fuzzers | 104 api.step.active_result.presentation.logs['all_fuzzers'] = all_fuzzers |
| 106 api.step.active_result.presentation.logs['no_clusterfuzz'] = no_clusterfuzz | 105 api.step.active_result.presentation.logs['no_clusterfuzz'] = no_clusterfuzz |
| 107 api.step.active_result.presentation.logs['targets'] = targets | 106 api.step.active_result.presentation.logs['targets'] = targets |
| 108 api.chromium.compile(targets=targets) | 107 api.chromium.compile(targets=targets) |
| 109 | 108 |
| 110 api.archive.clusterfuzz_archive( | 109 api.archive.clusterfuzz_archive( |
| 111 build_dir=api.infra_paths['slave_build'].join( | 110 build_dir=api.path['slave_build'].join('src', 'out', 'Release'), |
| 112 'src', 'out', 'Release'), | |
| 113 update_properties=checkout_results.json.output['properties'], | 111 update_properties=checkout_results.json.output['properties'], |
| 114 gs_bucket=bot_config['upload_bucket'], | 112 gs_bucket=bot_config['upload_bucket'], |
| 115 archive_prefix='libfuzzer', | 113 archive_prefix='libfuzzer', |
| 116 archive_subdir_suffix=bot_config['upload_directory'], | 114 archive_subdir_suffix=bot_config['upload_directory'], |
| 117 gs_acl='public-read') | 115 gs_acl='public-read') |
| 118 | 116 |
| 119 | 117 |
| 120 def GenTests(api): | 118 def GenTests(api): |
| 121 for test in api.chromium.gen_tests_for_builders(BUILDERS): | 119 for test in api.chromium.gen_tests_for_builders(BUILDERS): |
| 122 yield (test + | 120 yield (test + |
| 123 api.step_data('calculate all_fuzzers', | 121 api.step_data('calculate all_fuzzers', |
| 124 stdout=api.raw_io.output('target1 target2 target3')) + | 122 stdout=api.raw_io.output('target1 target2 target3')) + |
| 125 api.step_data('calculate no_clusterfuzz', | 123 api.step_data('calculate no_clusterfuzz', |
| 126 stdout=api.raw_io.output('target1')) | 124 stdout=api.raw_io.output('target1')) |
| 127 ) | 125 ) |
| 128 | 126 |
| OLD | NEW |