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

Unified 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: Rebased 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 side-by-side diff with in-line comments
Download patch
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'))
+ )
+

Powered by Google App Engine
This is Rietveld 408576698