本文整理汇总了Python中build_options.OPTIONS.enable_valgrind方法的典型用法代码示例。如果您正苦于以下问题:Python OPTIONS.enable_valgrind方法的具体用法?Python OPTIONS.enable_valgrind怎么用?Python OPTIONS.enable_valgrind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类build_options.OPTIONS
的用法示例。
在下文中一共展示了OPTIONS.enable_valgrind方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: generate_test_ninjas
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import enable_valgrind [as 别名]
def generate_test_ninjas():
n = ninja_generator.TestNinjaGenerator(
'stlport_unittest',
base_path=_STLPORT_ROOT + '/test/unit')
n.add_c_flags('-Werror')
n.add_cxx_flags('-Werror')
# For avoiding compile failure on min_test.cpp.
n.add_cxx_flags('-Wno-sequence-point')
# For avoiding compile failure on sstream_test.cpp and time_facets_test.cpp.
n.add_cxx_flags('-Wno-uninitialized')
# For avoiding compile failure on --disable-debug-code.
n.add_cxx_flags('-Wno-maybe-uninitialized')
n.build_default(
n.find_all_files(_STLPORT_ROOT + '/test/unit',
['.cpp', '.c'],
include_tests=True,
exclude=_EXCLUDE_FILES),
base_path=None)
argv = '-x=%s' % ','.join(_EXCLUDE_TESTS)
n.run(n.link(), argv=argv, enable_valgrind=OPTIONS.enable_valgrind(),
rule='run_test')
示例2: relevant
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import enable_valgrind [as 别名]
def relevant(f):
if f.find('/fundamental/') >= 0:
return False
if re.search(r'(_benchmark|/benchmark_main)\.cpp$', f):
return False
if OPTIONS.enable_valgrind():
# A few tests in these files fail under valgrind probably due to
# a valgrind's bug around rounding mode. As it is not important
# to run these tests under valgrind, we simply do not build them.
if f in ['android/bionic/tests/fenv_test.cpp',
'android/bionic/tests/math_test.cpp']:
return False
excludes = [
# We do not support eventfd.
'android/bionic/tests/eventfd_test.cpp',
# We do not compile this as this test does not pass the NaCl
# validation.
# TODO(crbug.com/342292): Enable stack protector on BMM.
'android/bionic/tests/stack_protector_test.cpp',
# We do not support death tests.
'android/bionic/tests/stack_unwinding_test.cpp',
# Neither NaCl nor Bare Metal supports statvfs and fstatvfs.
'android/bionic/tests/statvfs_test.cpp',
]
return f not in excludes
示例3: _generate_bare_metal_test_ninjas
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import enable_valgrind [as 别名]
def _generate_bare_metal_test_ninjas():
# Though the libbare_metal_test is not a library, we specify
# is_system_library=True to prevent CNinjaGenerator from linking
# this binary against Bionic libc.
n = TestNinjaGenerator('libbare_metal_test',
base_path='src/bare_metal/common',
is_system_library=True)
_set_bare_metal_flags(n)
n.add_whole_archive_deps('libbare_metal.a')
n.build_default_all_test_sources()
build_out = _link_for_bare_metal(n)
# As src/bare_metal is an ephemeral implementation, we do not run
# the test under valgrind not to complicate toolchain.py.
if not OPTIONS.enable_valgrind():
n.run(build_out)
示例4: _filter_libc_common_for_i686
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import enable_valgrind [as 别名]
def _filter_libc_common_for_i686(vars, sources):
for f in _I686_ASM_FILES:
sources.append(_get_asm_source(f))
if OPTIONS.is_bare_metal_i686() and OPTIONS.enable_valgrind():
# SSE2 strchr may access address before the passed string when the
# string is not 16-byte aligned and valgrind complains.
sources.remove('android/bionic/libc/arch-x86/string/sse2-strchr-atom.S')
sources.append('android/bionic/libc/bionic/strchr.cpp')
if OPTIONS.is_bare_metal_build():
# For direct syscalls used internally.
sources.append('android/bionic/libc/arch-x86/bionic/syscall.S')
else:
# See the comment in _filter_libc_common_for_arm.
# TODO(crbug.com/318433): Use order-only dependencies.
vars.get_implicit_deps().append(_get_gen_source_stamp())
# It seems newlib's memset is slightly faster than the
# assembly implementation (0.16[sec/GB] vs 0.19[sec/GB]).
sources.append('nacl-newlib/newlib/libc/string/memset.c')
# This file contains inline assembly.
sources.remove('android/bionic/libc/arch-x86/bionic/__set_tls.c')
# TODO(crbug.com/268485): Confirm ARC can ignore non-SSSE3 x86 devices
vars.get_cflags().append('-DUSE_SSSE3=1')