本文整理汇总了Python中pants.engine.round_engine.RoundEngine.sort_goals方法的典型用法代码示例。如果您正苦于以下问题:Python RoundEngine.sort_goals方法的具体用法?Python RoundEngine.sort_goals怎么用?Python RoundEngine.sort_goals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pants.engine.round_engine.RoundEngine
的用法示例。
在下文中一共展示了RoundEngine.sort_goals方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _execute_engine
# 需要导入模块: from pants.engine.round_engine import RoundEngine [as 别名]
# 或者: from pants.engine.round_engine.RoundEngine import sort_goals [as 别名]
def _execute_engine(self):
engine = RoundEngine()
sorted_goal_infos = engine.sort_goals(self._context, self._goals)
RunTracker.global_instance().set_sorted_goal_infos(sorted_goal_infos)
result = engine.execute(self._context, self._goals)
if self._context.invalidation_report:
self._context.invalidation_report.report()
return result
示例2: _execute_engine
# 需要导入模块: from pants.engine.round_engine import RoundEngine [as 别名]
# 或者: from pants.engine.round_engine.RoundEngine import sort_goals [as 别名]
def _execute_engine(self):
workdir = self._context.options.for_global_scope().pants_workdir
if not workdir.endswith('.pants.d'):
self._context.log.error('Pants working directory should end with \'.pants.d\', currently it is {}\n'
.format(workdir))
return 1
unknown_goals = [goal.name for goal in self._goals if not goal.ordered_task_names()]
if unknown_goals:
self._context.log.error('Unknown goal(s): {}\n'.format(' '.join(unknown_goals)))
return 1
engine = RoundEngine()
sorted_goal_infos = engine.sort_goals(self._context, self._goals)
RunTracker.global_instance().set_sorted_goal_infos(sorted_goal_infos)
result = engine.execute(self._context, self._goals)
if self._context.invalidation_report:
self._context.invalidation_report.report()
return result