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

Side by Side Diff: scripts/slave/recipes/webrtc/libfuzzer.py

Issue 1530293002: WebRTC: Add Libfuzzer commit and trybot. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 5 years 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
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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
7 DEPS = [ 8 DEPS = [
8 'archive', 9 'archive',
9 'bot_update', 10 'bot_update',
10 'chromium', 11 'chromium',
11 'file', 12 'file',
12 'recipe_engine/json', 13 'recipe_engine/json',
13 'recipe_engine/path', 14 'recipe_engine/path',
14 'recipe_engine/platform', 15 'recipe_engine/platform',
15 'recipe_engine/properties', 16 'recipe_engine/properties',
16 'recipe_engine/python', 17 'recipe_engine/python',
17 'recipe_engine/raw_io', 18 'recipe_engine/raw_io',
18 'recipe_engine/step', 19 'recipe_engine/step',
20 'webrtc',
19 ] 21 ]
20 22
21 23
22 BUILDERS = freeze({ 24 BUILDERS = freeze({
23 'chromium.fyi': { 25 'client.webrtc': {
24 'builders': { 26 'builders': {
25 'Libfuzzer Upload Linux': { 27 'Linux64 Release (Libfuzzer)': {
26 'chromium_apply_config': [ 'proprietary_codecs' ], 28 'recipe_config': 'webrtc',
27 'chromium_config_kwargs': { 29 'chromium_config_kwargs': {
28 'BUILD_CONFIG': 'Release', 30 'BUILD_CONFIG': 'Release',
29 'TARGET_PLATFORM': 'linux',
30 'TARGET_BITS': 64, 31 'TARGET_BITS': 64,
31 }, 32 },
32 'upload_bucket': 'chromium-browser-libfuzzer', 33 'chromium_apply_config': ['webrtc_libfuzzer'],
33 'upload_directory': 'asan', 34 'bot_type': 'builder',
35 'testing': {'platform': 'linux'},
34 }, 36 },
35 }, 37 },
36 }, 38 },
39 'tryserver.webrtc': {
40 'builders': {
41 'linux_libfuzzer_rel': {
42 'recipe_config': 'webrtc',
43 'chromium_config_kwargs': {
44 'BUILD_CONFIG': 'Release',
45 'TARGET_BITS': 64,
46 },
47 'chromium_apply_config': ['webrtc_libfuzzer'],
48 'bot_type': 'builder',
49 'testing': {'platform': 'linux'},
50 },
51 },
52 },
37 }) 53 })
38 54
39 55
40 def RunSteps(api): 56 def RunSteps(api):
41 mastername = api.m.properties['mastername'] 57 webrtc = api.webrtc
42 buildername, bot_config = api.chromium.configure_bot(BUILDERS, ['mb']) 58 webrtc.apply_bot_config(BUILDERS, webrtc.RECIPE_CONFIGS)
43 59
44 checkout_results = api.bot_update.ensure_checkout( 60 api.webrtc.checkout()
45 force=True, patch_root=bot_config.get('root_override'))
46
47 api.chromium.runhooks() 61 api.chromium.runhooks()
48 62
49 # checkout llvm 63 # checkout llvm
50 api.step('checkout llvm', 64 api.step('checkout llvm',
51 [api.path.sep.join(['tools', 'clang', 'scripts', 'update.py']), 65 [api.path.sep.join(['tools', 'clang', 'scripts', 'update.py']),
52 '--force-local-build', 66 '--force-local-build',
53 '--without-android'], 67 '--without-android'],
54 cwd=api.path['checkout'], 68 cwd=api.path['checkout'],
55 env={'LLVM_FORCE_HEAD_REVISION': 'YES'}) 69 env={'LLVM_FORCE_HEAD_REVISION': 'YES'})
56 70
57 api.chromium.run_mb(mastername, buildername, use_goma=False) 71 api.chromium.run_gn(use_goma=False)
kjellander_chromium 2015/12/16 22:16:54 MB is a Chromium specific thing that allows dprank
58 72
59 step_result = api.python('calculate targets', 73 step_result = api.python('calculate targets',
60 api.path['depot_tools'].join('gn.py'), 74 api.path['depot_tools'].join('gn.py'),
61 ['--root=%s' % str(api.path['checkout']), 75 ['--root=%s' % str(api.path['checkout']),
62 'refs', 76 'refs',
63 str(api.chromium.output_dir), 77 str(api.chromium.output_dir),
64 '--all', 78 '--all',
65 '--type=executable', 79 '--type=executable',
80 '--args="use_libfuzzer=true is_asan=true"',
kjellander_chromium 2015/12/16 22:16:54 This differs from the libfuzzer recipe. It's actua
kjellander_chromium 2015/12/16 22:22:08 Nevermind, it's actually not needed. As long as we
66 '--as=output', 81 '--as=output',
67 '//testing/libfuzzer:libfuzzer_main', 82 '//webrtc/test/fuzzers:webrtc_fuzzer_main',
68 ], 83 ],
69 stdout=api.raw_io.output()) 84 stdout=api.raw_io.output())
70 85
71 targets = step_result.stdout.split() 86 targets = step_result.stdout.split()
72 api.step.active_result.presentation.logs['targets'] = targets 87 api.step.active_result.presentation.logs['targets'] = targets
73 api.chromium.compile(targets=targets) 88 api.chromium.compile(targets=targets)
74 89
75 api.archive.clusterfuzz_archive(
76 api.path['slave_build'].join('src', 'out', 'Release'),
77 checkout_results.json.output['properties'],
78 bot_config['upload_bucket'],
79 'libfuzzer',
80 archive_subdir_suffix=bot_config['upload_directory'],
81 gs_acl='public-read')
82
83 90
84 def GenTests(api): 91 def GenTests(api):
85 for test in api.chromium.gen_tests_for_builders(BUILDERS): 92 for test in api.chromium.gen_tests_for_builders(BUILDERS):
86 yield (test + 93 yield (test +
87 api.step_data('calculate targets', 94 api.step_data('calculate targets',
88 stdout=api.raw_io.output('target1 target2 target3')) 95 stdout=api.raw_io.output('target1 target2 target3'))
89 ) 96 )
90 97
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698