# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree.
"""MB - the Meta-Build wrapper around GN.
MB is a wrapper script for GN that can be used to generate build files for sets of canned configurations and analyze them. """
class WebRTCMetaBuildWrapper(mb.MetaBuildWrapper):
def __init__(self):
super().__init__() # Make sure default_config and default_isolate_map are attributes of the # parent class before changing their values. # pylint: disable=access-member-before-definition assert self.default_config assert self.default_isolate_map
self.default_config = os.path.join(_SCRIPT_DIR, 'mb_config.pyl')
self.default_isolate_map = os.path.join(_SRC_DIR, 'infra', 'specs', 'gn_isolate_map.pyl')
if test_type == 'nontest':
self.WriteFailureAndRaise('We should not be isolating %s.' %
target,
output_path=None) if test_type notin ('console_test_launcher', 'windowed_test_launcher', 'non_parallel_console_test_launcher', 'raw', 'additional_compile_target', 'junit_test', 'script'):
self.WriteFailureAndRaise('No command line for ' '%s found (test type %s).' %
(target, test_type),
output_path=None)
# is_linux uses use_ozone and x11 by default.
use_x11 = is_linux
xvfb = use_x11 and test_type == 'windowed_test_launcher' if xvfb:
cmdline += [vpython_exe, '../../testing/xvfb.py']
extra_files.append('../../testing/xvfb.py') else:
cmdline += [vpython_exe, '../../testing/test_env.py']
extra_files += [ '../../third_party/gtest-parallel/gtest-parallel', '../../third_party/gtest-parallel/gtest_parallel.py', '../../tools_webrtc/gtest-parallel-wrapper.py',
]
output_dir = '${ISOLATED_OUTDIR}/test_logs'
cmdline += [ '../../tools_webrtc/gtest-parallel-wrapper.py', '--output_dir=%s' % output_dir, '--gtest_color=no',
] if test_type == 'non_parallel_console_test_launcher': # Still use the gtest-parallel-wrapper.py script since we # need it to run tests on swarming, but don't execute tests # in parallel.
cmdline.append('--workers=1')
asan = 'is_asan=true'in vals['gn_args']
lsan = 'is_lsan=true'in vals['gn_args']
msan = 'is_msan=true'in vals['gn_args']
tsan = 'is_tsan=true'in vals['gn_args']
sanitizer = asan or lsan or msan or tsan ifnot sanitizer: # Retry would hide most sanitizers detections.
cmdline.append('--retry_failed=3')
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.