Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
9fd5eae8
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
9fd5eae8
编写于
9月 07, 2020
作者:
Y
YUNSHEN XIE
提交者:
GitHub
9月 07, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add failed unittests retry on mac system (#26813)
* add retry on mac * fix some error * fix with some errors
上级
92bf0d47
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
57 addition
and
2 deletion
+57
-2
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+57
-2
未找到文件。
paddle/scripts/paddle_build.sh
浏览文件 @
9fd5eae8
...
@@ -528,9 +528,50 @@ EOF
...
@@ -528,9 +528,50 @@ EOF
elif
[
"
$1
"
==
"cp37-cp37m"
]
;
then
elif
[
"
$1
"
==
"cp37-cp37m"
]
;
then
pip3.7
install
--user
${
INSTALL_PREFIX
:-
/paddle/build
}
/opt/paddle/share/wheels/
*
.whl
pip3.7
install
--user
${
INSTALL_PREFIX
:-
/paddle/build
}
/opt/paddle/share/wheels/
*
.whl
fi
fi
tmpfile_rand
=
`
date
+%s%N
`
tmpfile
=
$tmp_dir
/
$tmpfile_rand
set
+e
set
+e
ut_startTime_s
=
`
date
+%s
`
ut_startTime_s
=
`
date
+%s
`
ctest
--output-on-failure
-j
$2
;
mactest_error
=
$?
ctest
--output-on-failure
-j
$2
|
tee
$tmpfile
failed_test_lists
=
''
collect_failed_tests
set
+x
mactest_error
=
0
retry_unittests_record
=
''
retry_time
=
3
exec_times
=
0
exec_time_array
=(
'first'
'second'
'third'
)
if
[
-n
"
$failed_test_lists
"
]
;
then
mactest_error
=
1
while
(
[
$exec_times
-lt
$retry_time
]
&&
[
-n
"
${
failed_test_lists
}
"
]
)
do
retry_unittests_record
=
"
$retry_unittests_record$failed_test_lists
"
failed_test_lists_ult
=
`
echo
"
${
failed_test_lists
}
"
`
read
retry_unittests
<<<
$(
echo
"
$failed_test_lists
"
|
grep
-oEi
"
\-
.+
\(
"
|
sed
's/(//'
|
sed
's/- //'
)
echo
"========================================="
echo
"This is the
${
exec_time_array
[
$exec_times
]
}
time to re-run"
echo
"========================================="
echo
"The following unittest will be re-run:"
echo
"
${
retry_unittests
}
"
echo
"========================================="
retry_unittests_regular
=
''
for
line
in
${
retry_unittests
[@]
}
;
do
if
[[
"
$retry_unittests_regular
"
==
""
]]
;
then
retry_unittests_regular
=
"^
$line
$"
else
retry_unittests_regular
=
"
$retry_unittests_regular
|^
$line
$"
fi
done
rm
-f
$tmp_dir
/
*
failed_test_lists
=
''
ctest
-R
"(
$retry_unittests_regular
)"
--output-on-failure
-j
$2
|
tee
$tmpfile
collect_failed_tests
exec_times
=
$[$exec_times
+1]
done
fi
#mactest_error=$?
ut_endTime_s
=
`
date
+%s
`
ut_endTime_s
=
`
date
+%s
`
echo
"Mac testCase Time:
$[
$ut_endTime_s
-
$ut_startTime_s
]s"
echo
"Mac testCase Time:
$[
$ut_endTime_s
-
$ut_startTime_s
]s"
paddle version
paddle version
...
@@ -538,7 +579,21 @@ EOF
...
@@ -538,7 +579,21 @@ EOF
export
http_proxy
=
$my_proxy
export
http_proxy
=
$my_proxy
export
https_proxy
=
$my_proxy
export
https_proxy
=
$my_proxy
if
[
"
$mactest_error
"
!=
0
]
;
then
if
[
"
$mactest_error
"
!=
0
]
;
then
exit
8
;
if
[[
"
$failed_test_lists
"
==
""
]]
;
then
echo
"========================================"
echo
"There are failed tests, which have been successful after re-run:"
echo
"========================================"
echo
"The following tests have been re-ran:"
echo
"
${
retry_unittests_record
}
"
else
failed_test_lists_ult
=
`
echo
"
${
failed_test_lists
}
"
`
echo
"========================================"
echo
"Summary Failed Tests... "
echo
"========================================"
echo
"The following tests FAILED: "
echo
"
${
failed_test_lists_ult
}
"
exit
8
;
fi
fi
fi
fi
fi
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录