代码拉取完成,页面将自动刷新
同步操作将从 tanghuikang/BinaryBugSearcher 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import os
from bbs import BugSearcher, CaseRunner, util, cmd
class CaseRunnerImpl(CaseRunner):
"""
Extends CaseRunner, run and check should be implemented
"""
def __init__(self):
super(CaseRunnerImpl, self).__init__()
self.log_file = 'log.log'
def run(self, commit_id=""):
"""
Prepare work and running case,including setting environment parameter and everything needed
Args:
commit_id (string): The commit id string.
"""
os.environ['XXX'] = 'XXX'
self.log_file = 'log_{}.log'.format(commit_id)
cmd.execute_cmd_quiet('python -m pytest -s xxx > {} 2>&1'.format(self.log_file))
def check(self):
"""
Check whether the case pass
returns:
bool, whether the case passed.
"""
return cmd.execute_cmd_quiet('grep "1 passed" {}'.format(self.log_file))
pass
def search():
case_runner = CaseRunnerImpl()
project_path = "/XXX/mindspore/"
hardware_info = [util.kAscendPlatformName, util.kArmArchName, util.kLinuxOsName]
latest_pass_commit = "XXX"
earliest_fail_commit = "XXX"
bug_searcher = BugSearcher(case_runner, project_path, hardware_info, latest_pass_commit,
earliest_fail_commit=earliest_fail_commit)
bug_searcher.search_bug()
if __name__ == '__main__':
search()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。