Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
49a60805
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
337
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
49a60805
编写于
5月 26, 2020
作者:
C
cfdx-gh
提交者:
GitHub
5月 26, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CI][Test Coverage] Fix security hardening (#3704)
上级
33cac039
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
34 addition
and
9 deletion
+34
-9
lite/tools/ci_build.sh
lite/tools/ci_build.sh
+12
-1
tools/coverage/gcda_clean.py
tools/coverage/gcda_clean.py
+1
-2
tools/coverage/paddle_lite_coverage.sh
tools/coverage/paddle_lite_coverage.sh
+20
-4
tools/coverage/pull_request.py
tools/coverage/pull_request.py
+1
-2
未找到文件。
lite/tools/ci_build.sh
浏览文件 @
49a60805
...
@@ -289,6 +289,17 @@ function build_test_server {
...
@@ -289,6 +289,17 @@ function build_test_server {
test_model_optimize_tool_compile
test_model_optimize_tool_compile
}
}
# Build the code and run lite server tests. This is executed in the CI system.
function
build_test_coverage
{
mkdir
-p
./build
cd
./build
export
LD_LIBRARY_PATH
=
"
$LD_LIBRARY_PATH
:
$PWD
/third_party/install/mklml/lib"
cmake_x86_for_CI
build
test_server
}
# The CUDA version of CI is cuda_10.1.243_418.87.00_linux.
# The CUDA version of CI is cuda_10.1.243_418.87.00_linux.
# The cuDNN version is cudnn-10.1-linux-x64-v7.5.0.56.
# The cuDNN version is cudnn-10.1-linux-x64-v7.5.0.56.
function
build_test_cuda_server
{
function
build_test_cuda_server
{
...
@@ -1136,7 +1147,7 @@ function main {
...
@@ -1136,7 +1147,7 @@ function main {
shift
shift
;;
;;
build_check_coverage
)
build_check_coverage
)
build_test_
server
build_test_
coverage
check_coverage
check_coverage
shift
shift
;;
;;
...
...
tools/coverage/gcda_clean.py
浏览文件 @
49a60805
...
@@ -10,8 +10,7 @@ import sys
...
@@ -10,8 +10,7 @@ import sys
from
github
import
Github
from
github
import
Github
token
=
os
.
getenv
(
'GITHUB_API_TOKEN'
,
'e51cb020919a6eef689257966e8fb6477981788a'
)
token
=
os
.
getenv
(
'GITHUB_API_TOKEN'
)
def
get_pull
(
pull_id
):
def
get_pull
(
pull_id
):
"""
"""
...
...
tools/coverage/paddle_lite_coverage.sh
浏览文件 @
49a60805
et
-xe
#!/bin/bash
# The git version of CI is 2.7.4. This script is not compatible with git version 1.7.1.
set
-xe
PADDLE_ROOT
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../../"
&&
pwd
)
"
PADDLE_ROOT
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../../"
&&
pwd
)
"
...
@@ -26,7 +28,6 @@ function gen_full_html_report() {
...
@@ -26,7 +28,6 @@ function gen_full_html_report() {
'/Paddle-Lite/lite/kernels/*'
\
'/Paddle-Lite/lite/kernels/*'
\
'/Paddle-Lite/lite/model_parser/*'
\
'/Paddle-Lite/lite/model_parser/*'
\
'/Paddle-Lite/lite/opreators/*'
\
'/Paddle-Lite/lite/opreators/*'
\
'/Paddle-Lite/lite/tests/*'
\
'/Paddle-Lite/lite/tools/*'
\
'/Paddle-Lite/lite/tools/*'
\
'/Paddle-Lite/lite/utils/*'
\
'/Paddle-Lite/lite/utils/*'
\
-o
coverage-full.tmp
\
-o
coverage-full.tmp
\
...
@@ -35,7 +36,21 @@ function gen_full_html_report() {
...
@@ -35,7 +36,21 @@ function gen_full_html_report() {
mv
-f
coverage-full.tmp coverage-full.info
mv
-f
coverage-full.tmp coverage-full.info
lcov
--remove
coverage-full.info
\
lcov
--remove
coverage-full.info
\
'/Paddle-Lite/lite/demo*'
\
'/Paddle-Lite/lite/tests/*'
\
'/Paddle-Lite/lite/demo/*'
\
'/Paddle-Lite/lite/fluid/*_test*'
\
'/Paddle-Lite/lite/model_parser/*_test*'
\
'/Paddle-Lite/lite/kernels/*/*test*'
\
'/Paddle-Lite/lite/kernels/*/bridges/*test*'
\
'/Paddle-Lite/lite/utils/*_test*'
\
'/Paddle-Lite/lite/api/*test*'
\
'/Paddle-Lite/lite/core/*_test*'
\
'/Paddle-Lite/lite/core/*/*test*'
\
'/Paddle-Lite/lite/core/mir/*/*_test*'
\
'/Paddle-Lite/lite/core/mir/*_test*'
\
'/Paddle-Lite/lite/backends/x86/*/*test*'
\
'/Paddle-Lite/lite/backends/opencl/*test*'
\
'/Paddle-Lite/lite/operators/*test*'
\
-o
coverage-full.tmp
\
-o
coverage-full.tmp
\
--rc
lcov_branch_coverage
=
0
--rc
lcov_branch_coverage
=
0
...
@@ -48,7 +63,7 @@ gen_full_html_report || true
...
@@ -48,7 +63,7 @@ gen_full_html_report || true
function
gen_diff_html_report
()
{
function
gen_diff_html_report
()
{
if
[
"
${
GIT_PR_ID
}
"
!=
""
]
;
then
if
[
"
${
GIT_PR_ID
}
"
!=
""
]
;
then
COVERAGE_DIFF_PATTERN
=
"
`
python
${
PADDLE_ROOT
}
/tools/coverage/pull_request.py files
${
GIT_PR_ID
}
`
"
COVERAGE_DIFF_PATTERN
=
"
`
python
${
PADDLE_ROOT
}
/tools/coverage/pull_request.py files
${
GIT_PR_ID
}
`
"
sleep
5
python
${
PADDLE_ROOT
}
/tools/coverage/pull_request.py diff
${
GIT_PR_ID
}
>
git-diff.out
python
${
PADDLE_ROOT
}
/tools/coverage/pull_request.py diff
${
GIT_PR_ID
}
>
git-diff.out
fi
fi
...
@@ -57,6 +72,7 @@ function gen_diff_html_report() {
...
@@ -57,6 +72,7 @@ function gen_diff_html_report() {
-o
coverage-diff.info
\
-o
coverage-diff.info
\
--rc
lcov_branch_coverage
=
0
--rc
lcov_branch_coverage
=
0
sleep
5
python
${
PADDLE_ROOT
}
/tools/coverage/coverage_diff.py coverage-diff.info git-diff.out
>
coverage-diff.tmp
python
${
PADDLE_ROOT
}
/tools/coverage/coverage_diff.py coverage-diff.info git-diff.out
>
coverage-diff.tmp
mv
-f
coverage-diff.tmp coverage-diff.info
mv
-f
coverage-diff.tmp coverage-diff.info
...
...
tools/coverage/pull_request.py
浏览文件 @
49a60805
...
@@ -11,8 +11,7 @@ import os
...
@@ -11,8 +11,7 @@ import os
from
github
import
Github
from
github
import
Github
token
=
os
.
getenv
(
'GITHUB_API_TOKEN'
,
'e51cb020919a6eef689257966e8fb6477981788a'
)
token
=
os
.
getenv
(
'GITHUB_API_TOKEN'
)
def
get_pull
(
pull_id
):
def
get_pull
(
pull_id
):
"""
"""
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录