| Index: scripts/slave/recipes/webrtc/libfuzzer.py
|
| diff --git a/scripts/slave/recipes/webrtc/libfuzzer.py b/scripts/slave/recipes/webrtc/libfuzzer.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0d8ab064442dc8372d451d14004e29db9b7aeb1b
|
| --- /dev/null
|
| +++ b/scripts/slave/recipes/webrtc/libfuzzer.py
|
| @@ -0,0 +1,96 @@
|
| +# Copyright 2015 The Chromium 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.types import freeze
|
| +
|
| +
|
| +DEPS = [
|
| + 'archive',
|
| + 'bot_update',
|
| + 'chromium',
|
| + 'file',
|
| + 'recipe_engine/json',
|
| + 'recipe_engine/path',
|
| + 'recipe_engine/platform',
|
| + 'recipe_engine/properties',
|
| + 'recipe_engine/python',
|
| + 'recipe_engine/raw_io',
|
| + 'recipe_engine/step',
|
| + 'webrtc',
|
| +]
|
| +
|
| +
|
| +BUILDERS = freeze({
|
| + 'client.webrtc': {
|
| + 'builders': {
|
| + 'Linux64 Release (Libfuzzer)': {
|
| + 'recipe_config': 'webrtc',
|
| + 'chromium_config_kwargs': {
|
| + 'BUILD_CONFIG': 'Release',
|
| + 'TARGET_BITS': 64,
|
| + },
|
| + 'chromium_apply_config': ['webrtc_libfuzzer'],
|
| + 'bot_type': 'builder',
|
| + 'testing': {'platform': 'linux'},
|
| + },
|
| + },
|
| + },
|
| + 'tryserver.webrtc': {
|
| + 'builders': {
|
| + 'linux_libfuzzer_rel': {
|
| + 'recipe_config': 'webrtc',
|
| + 'chromium_config_kwargs': {
|
| + 'BUILD_CONFIG': 'Release',
|
| + 'TARGET_BITS': 64,
|
| + },
|
| + 'chromium_apply_config': ['webrtc_libfuzzer'],
|
| + 'bot_type': 'builder',
|
| + 'testing': {'platform': 'linux'},
|
| + },
|
| + },
|
| + },
|
| +})
|
| +
|
| +
|
| +def RunSteps(api):
|
| + webrtc = api.webrtc
|
| + webrtc.apply_bot_config(BUILDERS, webrtc.RECIPE_CONFIGS)
|
| +
|
| + api.webrtc.checkout()
|
| + api.chromium.runhooks()
|
| +
|
| + # checkout llvm
|
| + api.step('checkout llvm',
|
| + [api.path.sep.join(['tools', 'clang', 'scripts', 'update.py']),
|
| + '--force-local-build',
|
| + '--without-android'],
|
| + cwd=api.path['checkout'],
|
| + env={'LLVM_FORCE_HEAD_REVISION': 'YES'})
|
| +
|
| + api.chromium.run_gn(use_goma=False)
|
| +
|
| + step_result = api.python('calculate targets',
|
| + api.path['depot_tools'].join('gn.py'),
|
| + ['--root=%s' % str(api.path['checkout']),
|
| + 'refs',
|
| + str(api.chromium.output_dir),
|
| + '--all',
|
| + '--type=executable',
|
| + '--as=output',
|
| + '//webrtc/test/fuzzers:webrtc_fuzzer_main',
|
| + ],
|
| + stdout=api.raw_io.output())
|
| +
|
| + targets = step_result.stdout.split()
|
| + api.step.active_result.presentation.logs['targets'] = targets
|
| + api.chromium.compile(targets=targets)
|
| +
|
| +
|
| +def GenTests(api):
|
| + for test in api.chromium.gen_tests_for_builders(BUILDERS):
|
| + yield (test +
|
| + api.step_data('calculate targets',
|
| + stdout=api.raw_io.output('target1 target2 target3'))
|
| + )
|
| +
|
|
|