Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
373e0e50
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
373e0e50
编写于
12月 22, 2020
作者:
L
liuyq-617
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
reduce fail case time cost
上级
827c7bea
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
60 addition
and
5 deletion
+60
-5
Jenkinsfile
Jenkinsfile
+4
-4
tests/test-all.sh
tests/test-all.sh
+56
-1
未找到文件。
Jenkinsfile
浏览文件 @
373e0e50
...
...
@@ -86,7 +86,7 @@ pipeline {
pre_test
()
sh
'''
cd ${WKC}/tests
./test-all.sh pytest
./test-all.sh pytest
fq
date'''
}
}
...
...
@@ -96,7 +96,7 @@ pipeline {
pre_test
()
sh
'''
cd ${WKC}/tests
./test-all.sh b1
./test-all.sh b1
fq
date'''
}
}
...
...
@@ -120,7 +120,7 @@ pipeline {
sh
'''
date
cd ${WKC}/tests
./test-all.sh b2
./test-all.sh b2
fq
date
'''
}
...
...
@@ -141,7 +141,7 @@ pipeline {
sh
'''
date
cd ${WKC}/tests
./test-all.sh b3
./test-all.sh b3
fq
date'''
}
}
...
...
tests/test-all.sh
浏览文件 @
373e0e50
...
...
@@ -25,6 +25,24 @@ function runSimCaseOneByOne {
fi
done
<
$1
}
function
runSimCaseOneByOnefq
{
while
read
-r
line
;
do
if
[[
$line
=
~ ^./test.sh
*
]]
||
[[
$line
=
~ ^run
*
]]
;
then
case
=
`
echo
$line
|
grep
sim
$
|awk
'{print $NF}'
`
start_time
=
`
date
+%s
`
./test.sh
-f
$case
>
/dev/null 2>&1
&&
\
echo
-e
"
${
GREEN
}
$case
success
${
NC
}
"
|
tee
-a
out.log
||
\
echo
-e
"
${
RED
}
$case
failed
${
NC
}
"
|
tee
-a
out.log
out_log
=
`
tail
-1
out.log
`
if
[[
$out_log
=
~
'failed'
]]
;
then
exit
8
fi
end_time
=
`
date
+%s
`
echo
execution
time
of
$case
was
`
expr
$end_time
-
$start_time
`
s.
|
tee
-a
out.log
fi
done
<
$1
}
function
runPyCaseOneByOne
{
while
read
-r
line
;
do
...
...
@@ -52,7 +70,32 @@ function runPyCaseOneByOne {
fi
done
<
$1
}
function
runPyCaseOneByOnefq
{
while
read
-r
line
;
do
if
[[
$line
=
~ ^python.
*
]]
;
then
if
[[
$line
!=
*
sleep
*
]]
;
then
if
[[
$line
=
~
'-r'
]]
;
then
case
=
`
echo
$line
|awk
'{print $4}'
`
else
case
=
`
echo
$line
|awk
'{print $NF}'
`
fi
start_time
=
`
date
+%s
`
$line
>
/dev/null 2>&1
&&
\
echo
-e
"
${
GREEN
}
$case
success
${
NC
}
"
|
tee
-a
pytest-out.log
||
\
echo
-e
"
${
RED
}
$case
failed
${
NC
}
"
|
tee
-a
pytest-out.log
end_time
=
`
date
+%s
`
out_log
=
`
tail
-1
pytest-out.log
`
if
[[
$out_log
=
~
'failed'
]]
;
then
exit
8
fi
echo
execution
time
of
$case
was
`
expr
$end_time
-
$start_time
`
s.
|
tee
-a
pytest-out.log
else
$line
>
/dev/null 2>&1
fi
fi
done
<
$1
}
totalFailed
=
0
totalPyFailed
=
0
...
...
@@ -78,6 +121,15 @@ if [ "$2" != "python" ]; then
elif
[
"
$1
"
==
"b3"
]
;
then
echo
"### run TSIM b3 test ###"
runSimCaseOneByOne jenkins/basic_3.txt
elif
[
"
$1
"
==
"b1fq"
]
;
then
echo
"### run TSIM b1 test ###"
runSimCaseOneByOnefq jenkins/basic_1.txt
elif
[
"
$1
"
==
"b2fq"
]
;
then
echo
"### run TSIM b2 test ###"
runSimCaseOneByOnefq jenkins/basic_2.txt
elif
[
"
$1
"
==
"b3fq"
]
;
then
echo
"### run TSIM b3 test ###"
runSimCaseOneByOnefq jenkins/basic_3.txt
elif
[
"
$1
"
==
"smoke"
]
||
[
-z
"
$1
"
]
;
then
echo
"### run TSIM smoke test ###"
runSimCaseOneByOne basicSuite.sim
...
...
@@ -137,6 +189,9 @@ if [ "$2" != "sim" ]; then
elif
[
"
$1
"
==
"pytest"
]
;
then
echo
"### run Python full test ###"
runPyCaseOneByOne fulltest.sh
elif
[
"
$1
"
==
"pytestfq"
]
;
then
echo
"### run Python full test ###"
runPyCaseOneByOnefq fulltest.sh
elif
[
"
$1
"
==
"p1"
]
;
then
echo
"### run Python_1 test ###"
runPyCaseOneByOne pytest_1.sh
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录