当前位置: 首页>>代码示例>>Python>>正文


Python OPTIONS.enable_valgrind方法代码示例

本文整理汇总了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')
开发者ID:epowers,项目名称:arc,代码行数:27,代码来源:config.py

示例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')
开发者ID:epowers,项目名称:arc,代码行数:34,代码来源:config.py

示例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')
开发者ID:epowers,项目名称:arc,代码行数:47,代码来源:config.py

示例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.")
开发者ID:epowers,项目名称:arc,代码行数:7,代码来源:launch_chrome_options.py


注:本文中的src.build.build_options.OPTIONS.enable_valgrind方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。