未验证 提交 0f78ddb9 编写于 作者: Y YUNSHEN XIE 提交者: GitHub

Fix path error on windows (#33122)

* fix path error on windows when precision switch is turn on

* fix error

* Update get_pr_ut.py

fix format error

* Update get_pr_ut.py
上级 a9869297
......@@ -248,13 +248,15 @@ class PRChecker(object):
return True
def get_all_count(self):
os.system(
"cd %sbuild && ctest -N|grep 'Total Tests:' | awk -F ': ' '{print $2}' > testCount"
% PADDLE_ROOT)
f = open("%sbuild/testCount" % PADDLE_ROOT)
testCount = f.read()
f.close()
return int(testCount.strip())
p = subprocess.Popen(
"cd {}build && ctest -N".format(PADDLE_ROOT),
shell=True,
stdout=subprocess.PIPE)
out, err = p.communicate()
for line in out.splitlines():
if 'Total Tests:' in str(line):
all_counts = line.split()[-1]
return int(all_counts)
def get_pr_ut(self):
""" Get unit tests in pull request. """
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册