本文整理汇总了Python中src.build.build_options.OPTIONS.enable_valgrind方法的典型用法代码示例。如果您正苦于以下问题:Python OPTIONS.enable_valgrind方法的具体用法?Python OPTIONS.enable_valgrind怎么用?Python OPTIONS.enable_valgrind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类src.build.build_options.OPTIONS
的用法示例。
在下文中一共展示了OPTIONS.enable_valgrind方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _generate_jemalloc_integration_tests
# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import enable_valgrind [as 别名]
def _generate_jemalloc_integration_tests():
paths = build_common.find_all_files(
'android/external/jemalloc/test/integration', ['.c'], include_tests=True)
# Disable some multi-threaded tests flaky under ARM qemu.
if OPTIONS.is_arm():
paths.remove('android/external/jemalloc/test/integration/MALLOCX_ARENA.c')
paths.remove('android/external/jemalloc/test/integration/thread_arena.c')
for path in paths:
name = os.path.splitext(os.path.basename(path))[0]
n = ninja_generator.TestNinjaGenerator('jemalloc_integartion_test_' + name)
n.add_include_paths(
'android/external/jemalloc/include',
'android/external/jemalloc/test/include')
n.add_c_flags('-Werror')
n.add_c_flags('-DJEMALLOC_INTEGRATION_TEST')
if OPTIONS.enable_jemalloc_debug():
n.add_c_flags('-DJEMALLOC_DEBUG')
# Needs C99 for "restrict" keyword.
n.add_c_flags('-std=gnu99')
n.add_library_deps('libjemalloc.a')
n.add_library_deps('libjemalloc_integrationtest.a')
n.build_default([path])
n.run(n.link(), enable_valgrind=OPTIONS.enable_valgrind(), rule='run_test')
示例2: _generate_jemalloc_unit_tests
# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import enable_valgrind [as 别名]
def _generate_jemalloc_unit_tests():
paths = build_common.find_all_files(
'android/external/jemalloc/test/unit', ['.c'], include_tests=True)
# These tests need -DJEMALLOC_PROF which we do not enable.
paths.remove('android/external/jemalloc/test/unit/prof_accum.c')
paths.remove('android/external/jemalloc/test/unit/prof_accum_a.c')
paths.remove('android/external/jemalloc/test/unit/prof_accum_b.c')
paths.remove('android/external/jemalloc/test/unit/prof_gdump.c')
paths.remove('android/external/jemalloc/test/unit/prof_idump.c')
# Disable some multi-threaded tests flaky under ARM qemu.
if OPTIONS.is_arm():
paths.remove('android/external/jemalloc/test/unit/mq.c')
paths.remove('android/external/jemalloc/test/unit/mtx.c')
for path in paths:
name = os.path.splitext(os.path.basename(path))[0]
n = ninja_generator.TestNinjaGenerator('jemalloc_unit_test_' + name)
n.add_include_paths(
'android/external/jemalloc/include',
'android/external/jemalloc/test/include')
n.add_c_flags('-Werror')
n.add_c_flags('-DJEMALLOC_UNIT_TEST')
if OPTIONS.enable_jemalloc_debug():
n.add_c_flags('-DJEMALLOC_DEBUG')
# Needs C99 for "restrict" keyword.
n.add_c_flags('-std=gnu99')
n.add_library_deps('libjemalloc_jet.a')
n.add_library_deps('libjemalloc_unittest.a')
n.build_default([path])
n.run(n.link(), enable_valgrind=OPTIONS.enable_valgrind(), rule='run_test')
示例3: generate_test_ninjas
# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.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')
if n.is_clang_enabled():
# For avoiding compile failure on string_test.cpp.
n.add_cxx_flags('-Wno-unused-comparison')
# For avoiding compile failure on resolve_name.cpp.
n.add_cxx_flags('-Wno-unused-function')
# For avoiding compile failure on fstream_test.cpp and sstream_test.cpp.
n.add_cxx_flags('-Wno-unused-private-field')
# For avoiding compile failure on slist_test.cpp, list_test.cpp and
# type_traits_test.cpp.
n.add_cxx_flags('-Wno-unused-variable')
else:
# For avoiding compile failure on --disable-debug-code.
n.add_cxx_flags('-Wno-maybe-uninitialized')
# Define STLPORT so that cppunit_proxy.h does not define
# CPPUNIT_MINI_USE_EXCEPTIONS
n.add_cxx_flags('-DSTLPORT')
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')
示例4: _validate_valgrind
# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import enable_valgrind [as 别名]
def _validate_valgrind(parser, args):
if OPTIONS.enable_valgrind():
parser.error("You cannot run ARC with binaries built for Valgrind "
"because Valgrind build uses runnable-ld.so with a "
"special hack for Valgrind.")