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


Python webkit_finder.WebKitFinder类代码示例

本文整理汇总了Python中webkitpy.common.webkit_finder.WebKitFinder的典型用法代码示例。如果您正苦于以下问题:Python WebKitFinder类的具体用法?Python WebKitFinder怎么用?Python WebKitFinder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了WebKitFinder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _read_configuration_from_gn

def _read_configuration_from_gn(fs, options):
    """Return the configuration to used based on args.gn, if possible."""

    # We should really default to 'out' everywhere at this point, but
    # that's a separate cleanup CL.
    build_directory = getattr(options, 'build_directory', None) or 'out'

    target = options.target
    finder = WebKitFinder(fs)
    path = fs.join(finder.chromium_base(), build_directory, target, 'args.gn')
    if not fs.exists(path):
        path = fs.join(finder.chromium_base(), build_directory, target, 'toolchain.ninja')
        if not fs.exists(path):
            # This does not appear to be a GN-based build directory, so we don't know
            # how to interpret it.
            return None

        # toolchain.ninja exists, but args.gn does not; this can happen when
        # `gn gen` is run with no --args.
        return 'Debug'

    args = fs.read_text_file(path)
    for l in args.splitlines():
        m = re.match('^\s*is_debug\s*=\s*false(\s*$|\s*#.*$)', l)
        if m:
            return 'Release'

    # if is_debug is set to anything other than false, or if it
    # does not exist at all, we should use the default value (True).
    return 'Debug'
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:30,代码来源:factory.py

示例2: __init__

    def __init__(self, host, source_directory, options):
        self.host = host
        self.source_directory = source_directory
        self.options = options

        self.filesystem = self.host.filesystem

        webkit_finder = WebKitFinder(self.filesystem)
        self._webkit_root = webkit_finder.webkit_base()

        self.destination_directory = webkit_finder.path_from_webkit_base("LayoutTests", options.destination)
        self.tests_w3c_relative_path = self.filesystem.join('imported', 'w3c')
        self.layout_tests_path = webkit_finder.path_from_webkit_base('LayoutTests')
        self.layout_tests_w3c_path = self.filesystem.join(self.layout_tests_path, self.tests_w3c_relative_path)
        self.tests_download_path = webkit_finder.path_from_webkit_base('WebKitBuild', 'w3c-tests')

        self._test_downloader = None

        self._potential_test_resource_files = []

        self.import_list = []
        self._importing_downloaded_tests = source_directory is None

        self._test_resource_files_json_path = self.filesystem.join(self.layout_tests_w3c_path, "resources", "resource-files.json")
        self._test_resource_files = json.loads(self.filesystem.read_text_file(self._test_resource_files_json_path)) if self.filesystem.exists(self._test_resource_files_json_path) else None

        self._tests_options_json_path = self.filesystem.join(self.layout_tests_path, 'tests-options.json')
        self._tests_options = json.loads(self.filesystem.read_text_file(self._tests_options_json_path)) if self.filesystem.exists(self._tests_options_json_path) else None
        self._slow_tests = []

        if self.options.clean_destination_directory and self._test_resource_files:
            self._test_resource_files["files"] = []
            if self._tests_options:
                self.remove_slow_from_w3c_tests_options()
开发者ID:eocanha,项目名称:webkit,代码行数:34,代码来源:test_importer.py

示例3: _test_prefix_list

    def _test_prefix_list(self, issue_number, only_changed_tests):
        """Returns a collection of test, builder and file extensions to get new baselines for.

        Args:
            issue_number: The CL number of the change which needs new baselines.
            only_changed_tests: Whether to only include baselines for tests that
               are changed in this CL. If False, all new baselines for failing
               tests will be downloaded, even for tests that were not modified.

        Returns:
            A dict containing information about which new baselines to download.
        """
        builds_to_tests = self._builds_to_tests(issue_number)
        if only_changed_tests:
            files_in_cl = self.rietveld.changed_files(issue_number)
            finder = WebKitFinder(self._tool.filesystem)
            tests_in_cl = [finder.layout_test_name(f) for f in files_in_cl]
        result = {}
        for build, tests in builds_to_tests.iteritems():
            for test in tests:
                if only_changed_tests and test not in tests_in_cl:
                    continue
                if test not in result:
                    result[test] = {}
                result[test][build] = BASELINE_SUFFIX_LIST
        return result
开发者ID:ollie314,项目名称:chromium,代码行数:26,代码来源:rebaseline_cl.py

示例4: __init__

    def __init__(self, repository_directory, host, options):
        self._options = options
        self._host = host
        self._filesystem = host.filesystem
        self._test_suites = []

        self.repository_directory = repository_directory

        self.test_repositories = self.load_test_repositories()

        self.paths_to_skip = []
        self.paths_to_import = []
        for test_repository in self.test_repositories:
            self.paths_to_skip.extend(
                [self._filesystem.join(test_repository["name"], path) for path in test_repository["paths_to_skip"]]
            )
            self.paths_to_import.extend(
                [self._filesystem.join(test_repository["name"], path) for path in test_repository["paths_to_import"]]
            )

        if not self._options.import_all:
            webkit_finder = WebKitFinder(self._filesystem)
            import_expectations_path = webkit_finder.path_from_webkit_base(
                "LayoutTests", "imported", "w3c", "resources", "ImportExpectations"
            )
            self._init_paths_from_expectations(import_expectations_path)
开发者ID:rhythmkay,项目名称:webkit,代码行数:26,代码来源:test_downloader.py

示例5: load_test_repositories

 def load_test_repositories():
     filesystem = FileSystem()
     webkit_finder = WebKitFinder(filesystem)
     test_repositories_path = webkit_finder.path_from_webkit_base(
         "LayoutTests", "imported", "w3c", "resources", "TestRepositories"
     )
     return json.loads(filesystem.read_text_file(test_repositories_path))
开发者ID:rhythmkay,项目名称:webkit,代码行数:7,代码来源:test_downloader.py

示例6: get_port

 def get_port(self, target=None, configuration=None, files=None):
     host = MockHost()
     wkf = WebKitFinder(host.filesystem)
     files = files or {}
     for path, contents in files.items():
         host.filesystem.write_text_file(wkf.path_from_chromium_base(path), contents)
     options = optparse.Values({'target': target, 'configuration': configuration})
     return factory.PortFactory(host).get(options=options)
开发者ID:mirror,项目名称:chromium,代码行数:8,代码来源:factory_unittest.py

示例7: get_port

 def get_port(self, target=None, configuration=None, files=None):
     host = MockSystemHost()
     wkf = WebKitFinder(host.filesystem)
     files = files or {}
     for path, contents in files.items():
         host.filesystem.write_text_file(wkf.path_from_chromium_base(path), contents)
     options = MockOptions(target=target, configuration=configuration)
     return factory.PortFactory(host).get(options=options)
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:8,代码来源:factory_unittest.py

示例8: _run_pylint

 def _run_pylint(self, path):
     wkf = WebKitFinder(FileSystem())
     executive = Executive()
     return executive.run_command([sys.executable, wkf.path_from_depot_tools_base('pylint.py'),
                                   '--output-format=parseable',
                                   '--errors-only',
                                   '--rcfile=' + wkf.path_from_webkit_base('Tools', 'Scripts', 'webkitpy', 'pylintrc'),
                                   path],
                                   error_handler=executive.ignore_error)
开发者ID:,项目名称:,代码行数:9,代码来源:

示例9: main

def main():
    filesystem = FileSystem()
    wkf = WebKitFinder(filesystem)
    tester = Tester(filesystem, wkf)
    tester.add_tree(wkf.path_from_webkit_base('tools'), 'webkitpy')

    tester.skip(('webkitpy.common.checkout.scm.scm_unittest',), 'are really, really, slow', 31818)
    if sys.platform == 'win32':
        tester.skip(('webkitpy.common.checkout', 'webkitpy.common.config', 'webkitpy.tool', 'webkitpy.w3c', 'webkitpy.layout_tests.layout_package.bot_test_expectations'), 'fail horribly on win32', 54526)

    return not tester.run()
开发者ID:Jamesducque,项目名称:mojo,代码行数:11,代码来源:main.py

示例10: _determine_driver_path_statically

 def _determine_driver_path_statically(cls, host, options):
     config_object = config.Config(host.executive, host.filesystem)
     build_directory = getattr(options, "build_directory", None)
     finder = WebKitFinder(host.filesystem)
     webkit_base = finder.webkit_base()
     chromium_base = finder.chromium_base()
     driver_name = cls.SKY_SHELL_NAME
     if hasattr(options, "configuration") and options.configuration:
         configuration = options.configuration
     else:
         configuration = config_object.default_configuration()
     return cls._static_build_path(host.filesystem, build_directory, chromium_base, configuration, [driver_name])
开发者ID:jimsimon,项目名称:sky_engine,代码行数:12,代码来源:linux.py

示例11: __init__

    def __init__(self, host, source_directory, options):
        self.host = host
        self.source_directory = source_directory
        self.options = options

        self.filesystem = self.host.filesystem

        webkit_finder = WebKitFinder(self.filesystem)
        self._webkit_root = webkit_finder.webkit_base()

        self.destination_directory = webkit_finder.path_from_webkit_base("LayoutTests", options.destination)

        self.import_list = []
开发者ID:,项目名称:,代码行数:13,代码来源:

示例12: _run_pylint

 def _run_pylint(self, path):
     wkf = WebKitFinder(FileSystem())
     executive = Executive()
     env = os.environ.copy()
     env['PYTHONPATH'] = ('%s%s%s' % (wkf.path_from_webkit_base('Tools', 'Scripts'),
                                      os.pathsep,
                                      wkf.path_from_webkit_base('Tools', 'Scripts', 'webkitpy', 'thirdparty')))
     return executive.run_command([sys.executable, wkf.path_from_depot_tools_base('pylint.py'),
                                   '--output-format=parseable',
                                   '--errors-only',
                                   '--rcfile=' + wkf.path_from_webkit_base('Tools', 'Scripts', 'webkitpy', 'pylintrc'),
                                   path],
                                  env=env,
                                  error_handler=executive.ignore_error)
开发者ID:rzr,项目名称:Tizen_Crosswalk,代码行数:14,代码来源:python.py

示例13: __init__

 def __init__(self, host):
     self.host = host
     self.executive = host.executive
     self.fs = host.filesystem
     self.finder = WebKitFinder(self.fs)
     self.verbose = False
     self.git_cl = None
开发者ID:ollie314,项目名称:chromium,代码行数:7,代码来源:deps_updater.py

示例14: __init__

 def __init__(self, host):
     self.host = host
     self.executive = host.executive
     self.fs = host.filesystem
     self.finder = WebKitFinder(self.fs)
     self.verbose = False
     self.allow_local_blink_commits = False
     self.keep_w3c_repos_around = False
开发者ID:dreifachstein,项目名称:chromium-src,代码行数:8,代码来源:deps_updater.py

示例15: __init__

    def __init__(self, host, source_directory, options):
        self.host = host
        self.source_directory = source_directory
        self.options = options

        self.filesystem = self.host.filesystem

        webkit_finder = WebKitFinder(self.filesystem)
        self._webkit_root = webkit_finder.webkit_base()

        self.destination_directory = webkit_finder.path_from_webkit_base("LayoutTests", options.destination)
        self.layout_tests_w3c_path = webkit_finder.path_from_webkit_base('LayoutTests', 'imported', 'w3c')
        self.tests_download_path = webkit_finder.path_from_webkit_base('WebKitBuild', 'w3c-tests')

        self._test_downloader = None

        self.import_list = []
        self._importing_downloaded_tests = source_directory is None
开发者ID:cheekiatng,项目名称:webkit,代码行数:18,代码来源:test_importer.py


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