Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
e3612de8
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看板
未验证
提交
e3612de8
编写于
8月 20, 2020
作者:
Y
YUNSHEN XIE
提交者:
GitHub
8月 20, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add failed unittests retry (#26342)
上级
7e71ae92
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
88 addition
and
9 deletion
+88
-9
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+88
-9
未找到文件。
paddle/scripts/paddle_build.sh
浏览文件 @
e3612de8
...
...
@@ -936,17 +936,96 @@ set +x
card_test
"
$multiple_card_tests
"
2
# run cases with two GPUs
card_test
"
$exclusive_tests
"
# run cases exclusively, in this cases would be run with 4/8 GPUs
collect_failed_tests
if
[
-n
"
${
failed_test_lists
}
"
]
;
then
failed_test_lists_ult
=
`
echo
"
${
failed_test_lists
}
"
|grep
-Po
'[^ ].*$'
`
echo
"========================================"
echo
"Summary Failed Tests... "
echo
"========================================"
echo
"The following tests FAILED: "
echo
"
${
failed_test_lists_ult
}
"
fi
rm
-f
$tmp_dir
/
*
exec_times
=
0
retry_unittests_record
=
''
retry_time
=
3
exec_time_array
=(
'first'
'second'
'third'
)
if
[
-n
"
$failed_test_lists
"
]
;
then
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
}
"
|grep
-Po
'[^ ].*$'
`
read
retry_unittests
<<<
$(
echo
"
$failed_test_lists
"
|
grep
-oEi
"
\-
.+
\(\w
+
\)
"
|
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
"
${
failed_test_lists_ult
}
"
for
line
in
${
retry_unittests
[@]
}
;
do
one_card_tests
=
$single_card_tests
'|'
$single_card_tests_1
read
tmp_one_tmp
<<<
"
$(
echo
$one_card_tests
|
grep
-oEi
$line
)
"
read
tmp_mul_tmp
<<<
"
$(
echo
$multiple_card_tests
|
grep
-oEi
$line
)
"
read
exclusive_tmp
<<<
"
$(
echo
$exclusive_tests
|
grep
-oEi
$line
)
"
if
[[
"
$tmp_one_tmp
"
!=
""
]]
;
then
if
[[
"
$one_card_retry
"
==
""
]]
;
then
one_card_retry
=
"^
$line
$"
else
one_card_retry
=
"
$one_card_retry
|^
$line
$"
fi
elif
[[
"
$tmp_mul_tmp
"
!=
""
]]
;
then
if
[[
"
$multiple_card_retry
"
==
""
]]
;
then
multiple_card_retry
=
"^
$line
$"
else
multiple_card_retry
=
"
$multiple_card_retry
|^
$line
$"
fi
else
if
[[
"
$exclusive_retry
"
==
""
]]
;
then
exclusive_retry
=
"^
$line
$"
else
exclusive_retry
=
"
$exclusive_retry
|^
$line
$"
fi
fi
done
if
[[
"
$one_card_retry
"
!=
""
]]
;
then
card_test
"
$one_card_retry
"
1
fi
if
[[
"
$multiple_card_retry
"
!=
""
]]
;
then
card_test
"
$multiple_card_retry
"
2
fi
if
[[
"
$exclusive_retry
"
!=
""
]]
;
then
card_test
"
$exclusive_retry
"
fi
exec_times
=
$[$exec_times
+1]
failed_test_lists
=
''
collect_failed_tests
rm
-f
$tmp_dir
/
*
one_card_retry
=
''
multiple_card_retry
=
''
exclusive_retry
=
''
retry_unittests
=
''
done
fi
if
[[
"
$EXIT_CODE
"
!=
"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
}
"
|grep
-Po
'[^ ].*$'
`
echo
"========================================"
echo
"Summary Failed Tests... "
echo
"========================================"
echo
"The following tests FAILED: "
echo
"
${
failed_test_lists_ult
}
"
exit
8
;
fi
fi
set
-ex
fi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录