未验证 提交 f7b45fd6 编写于 作者: C chalsliu 提交者: GitHub

Support precision test verification

上级 ad01658e
...@@ -37,6 +37,7 @@ class PRChecker(object): ...@@ -37,6 +37,7 @@ class PRChecker(object):
self.lineno_prog = re.compile('@@ \-\d+,\d+ \+(\d+),(\d+) @@') self.lineno_prog = re.compile('@@ \-\d+,\d+ \+(\d+),(\d+) @@')
self.pr = None self.pr = None
self.suffix = '' self.suffix = ''
self.full_case = False
def init(self): def init(self):
""" Get pull request. """ """ Get pull request. """
...@@ -48,6 +49,17 @@ class PRChecker(object): ...@@ -48,6 +49,17 @@ class PRChecker(object):
if suffix: if suffix:
self.suffix = suffix self.suffix = suffix
self.pr = self.repo.get_pull(int(pr_id)) self.pr = self.repo.get_pull(int(pr_id))
last_commit = None
ix = 0
while True:
commits = self.pr.get_commits().get_page(ix)
for c in commits:
last_commit = c.commit
else:
break
ix = ix + 1
if last_commit.message.find('test=full_case') != -1:
self.full_case = True
def get_pr_files(self): def get_pr_files(self):
""" Get files in pull request. """ """ Get files in pull request. """
...@@ -156,6 +168,8 @@ class PRChecker(object): ...@@ -156,6 +168,8 @@ class PRChecker(object):
def get_pr_ut(self): def get_pr_ut(self):
""" Get unit tests in pull request. """ """ Get unit tests in pull request. """
if self.full_case:
return ''
check_added_ut = False check_added_ut = False
ut_list = [] ut_list = []
file_ut_map = None file_ut_map = None
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册