本文整理汇总了Python中mozbuild.frontend.reader.BuildReader.files_info方法的典型用法代码示例。如果您正苦于以下问题:Python BuildReader.files_info方法的具体用法?Python BuildReader.files_info怎么用?Python BuildReader.files_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mozbuild.frontend.reader.BuildReader
的用法示例。
在下文中一共展示了BuildReader.files_info方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: find_paths_and_tags
# 需要导入模块: from mozbuild.frontend.reader import BuildReader [as 别名]
# 或者: from mozbuild.frontend.reader.BuildReader import files_info [as 别名]
def find_paths_and_tags(self, verbose):
paths, tags = set(), set()
changed_files = self.find_changed_files()
if changed_files:
if verbose:
print("Pushing tests based on modifications to the "
"following files:\n\t%s" % "\n\t".join(changed_files))
from mozbuild.frontend.reader import (
BuildReader,
EmptyConfig,
)
config = EmptyConfig(self.topsrcdir)
reader = BuildReader(config)
files_info = reader.files_info(changed_files)
for path, info in files_info.items():
paths |= info.test_files
tags |= info.test_tags
if verbose:
if paths:
print("Pushing tests based on the following patterns:\n\t%s" %
"\n\t".join(paths))
if tags:
print("Pushing tests based on the following tags:\n\t%s" %
"\n\t".join(tags))
return paths, tags
示例2: file_info_schedules
# 需要导入模块: from mozbuild.frontend.reader import BuildReader [as 别名]
# 或者: from mozbuild.frontend.reader.BuildReader import files_info [as 别名]
def file_info_schedules(self, paths):
"""Show what is scheduled by the given files.
Given a requested set of files (which can be specified using
wildcards), print the total set of scheduled components.
"""
from mozbuild.frontend.reader import EmptyConfig, BuildReader
config = EmptyConfig(TOPSRCDIR)
reader = BuildReader(config)
schedules = set()
for p, m in reader.files_info(paths).items():
schedules |= set(m['SCHEDULES'].components)
print(", ".join(schedules))
示例3: get_outgoing_metadata
# 需要导入模块: from mozbuild.frontend.reader import BuildReader [as 别名]
# 或者: from mozbuild.frontend.reader.BuildReader import files_info [as 别名]
def get_outgoing_metadata(self):
paths, tags, flavors = set(), set(), set()
changed_files = self.vcs.get_outgoing_files('AM')
if changed_files:
config = EmptyConfig(self.topsrcdir)
reader = BuildReader(config)
files_info = reader.files_info(changed_files)
for path, info in files_info.items():
paths |= info.test_files
tags |= info.test_tags
flavors |= info.test_flavors
return {
'paths': paths,
'tags': tags,
'flavors': flavors,
}