Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
8e031df6
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看板
提交
8e031df6
编写于
1月 28, 2022
作者:
T
tangfangzhi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add arm, macos build test
上级
b6f49e31
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
108 addition
and
40 deletion
+108
-40
tests/parallel_test/Jenkinsfile
tests/parallel_test/Jenkinsfile
+96
-35
tests/parallel_test/m.json
tests/parallel_test/m.json
+5
-5
tests/parallel_test/run.sh
tests/parallel_test/run.sh
+4
-0
tests/parallel_test/run_container.sh
tests/parallel_test/run_container.sh
+3
-0
未找到文件。
tests/parallel_test/Jenkinsfile
浏览文件 @
8e031df6
...
...
@@ -4,7 +4,10 @@ import jenkins.model.CauseOfInterruption
node
{
}
def
sync_source
()
{
sh
'hostname'
sh
'''
hostname
date
'''
sh
'''
cd ${WKC}
[ -f src/connector/grafanaplugin/README.md ] && rm -f src/connector/grafanaplugin/README.md > /dev/null || echo "failed to remove grafanaplugin README.md"
...
...
@@ -40,7 +43,7 @@ def sync_source() {
git pull >/dev/null
git fetch origin +refs/pull/${CHANGE_ID}/merge
git checkout -qf FETCH_HEAD
echo "// git clean -dfx"
git clean -dfx
git submodule update --init --recursive
cd ${WK}
git reset --hard HEAD~10
...
...
@@ -73,7 +76,7 @@ def sync_source() {
git pull >/dev/null
export TZ=Asia/Harbin
date
echo "// git clean -dfx"
git clean -dfx
'''
}
def
pre_test
()
{
...
...
@@ -82,11 +85,23 @@ def pre_test() {
cd ${WK}
mkdir -p debug
cd debug
go env -w GOPROXY=https://goproxy.cn,direct
go env -w GO111MODULE=on
cmake .. -DBUILD_HTTP=false -DBUILD_TOOLS=true > /dev/null
make -j8> /dev/null
echo "make install > /dev/null"
cd ${WKC}/tests
echo "pip3 install ${WKC}/src/connector/python/"
make -j8 >/dev/null
'''
return
1
}
def
pre_test_mac
()
{
sync_source
()
sh
'''
cd ${WK}
mkdir -p debug
cd debug
go env -w GOPROXY=https://goproxy.cn,direct
go env -w GO111MODULE=on
cmake .. -DBUILD_TOOLS=false > /dev/null
make -j8 >/dev/null
'''
return
1
}
...
...
@@ -94,9 +109,9 @@ pipeline {
agent
{
label
" dispatcher "
}
options
{
skipDefaultCheckout
()
}
environment
{
WK
=
'/
root
/jenkins/workspace/TDinternal'
WKC
=
'/
root
/jenkins/workspace/TDinternal/community'
LOGDIR
=
'/
root
/jenkins/workspace/log'
WK
=
'/
var/data
/jenkins/workspace/TDinternal'
WKC
=
'/
var/data
/jenkins/workspace/TDinternal/community'
LOGDIR
=
'/
var/data
/jenkins/workspace/log'
}
stages
{
stage
(
'pre_build'
)
{
...
...
@@ -121,8 +136,8 @@ pipeline {
parallel
{
stage
(
'dispatcher sync source'
)
{
steps
{
sync_source
()
timeout
(
time:
100
,
unit:
'MINUTES'
)
{
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
sync_source
()
script
{
sh
'''
echo "dispatcher ready"
...
...
@@ -135,8 +150,8 @@ pipeline {
stage
(
'build worker01'
)
{
agent
{
label
" worker01 "
}
steps
{
pre_test
()
timeout
(
time:
100
,
unit:
'MINUTES'
)
{
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
pre_test
()
script
{
sh
'''
echo "worker01 build done"
...
...
@@ -149,8 +164,8 @@ pipeline {
stage
(
'build worker02'
)
{
agent
{
label
" worker02 "
}
steps
{
pre_test
()
timeout
(
time:
100
,
unit:
'MINUTES'
)
{
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
pre_test
()
script
{
sh
'''
echo "worker02 build done"
...
...
@@ -163,8 +178,8 @@ pipeline {
stage
(
'build worker03'
)
{
agent
{
label
" worker03 "
}
steps
{
pre_test
()
timeout
(
time:
100
,
unit:
'MINUTES'
)
{
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
pre_test
()
script
{
sh
'''
echo "worker03 build done"
...
...
@@ -177,8 +192,8 @@ pipeline {
stage
(
'build worker04'
)
{
agent
{
label
" worker04 "
}
steps
{
pre_test
()
timeout
(
time:
100
,
unit:
'MINUTES'
)
{
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
pre_test
()
script
{
sh
'''
echo "worker04 build done"
...
...
@@ -191,8 +206,8 @@ pipeline {
stage
(
'build worker05'
)
{
agent
{
label
" worker05 "
}
steps
{
pre_test
()
timeout
(
time:
100
,
unit:
'MINUTES'
)
{
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
pre_test
()
script
{
sh
'''
echo "worker05 build done"
...
...
@@ -205,19 +220,65 @@ pipeline {
}
}
stage
(
'run test'
)
{
steps
{
sh
'''
date
hostname
'''
timeout
(
time:
100
,
unit:
'MINUTES'
)
{
sh
'''
date
cd ${WKC}/tests/parallel_test
time ./run.sh -m m.json -t cases.task -l ${LOGDIR} -b ${BRANCH_NAME}
date
hostname
'''
parallel
{
stage
(
'build worker06_arm64'
)
{
agent
{
label
" worker06_arm64 "
}
steps
{
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
pre_test
()
script
{
sh
'''
echo "worker06_arm64 build done"
date
'''
}
}
}
}
stage
(
'build worker07_arm64'
)
{
agent
{
label
" worker07_arm64 "
}
steps
{
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
pre_test
()
script
{
sh
'''
echo "worker07_arm64 build done"
date
'''
}
}
}
}
stage
(
'build Mac_catalina '
)
{
agent
{
label
" Mac_catalina "
}
steps
{
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
pre_test_mac
()
script
{
sh
'''
echo "Mac_catalina build done"
date
'''
}
}
}
}
stage
(
'run cases'
)
{
steps
{
sh
'''
date
hostname
'''
timeout
(
time:
60
,
unit:
'MINUTES'
)
{
sh
'''
date
cd ${WKC}/tests/parallel_test
time ./run.sh -m m.json -t cases.task -l ${LOGDIR} -b ${BRANCH_NAME}
date
hostname
'''
}
}
}
}
}
...
...
tests/parallel_test/m.json
浏览文件 @
8e031df6
[{
"host"
:
"192.168.0.210"
,
"username"
:
"root"
,
"workdir"
:
"/
root
/jenkins/workspace"
,
"workdir"
:
"/
var/data
/jenkins/workspace"
,
"thread"
:
25
},
{
"host"
:
"192.168.0.211"
,
"username"
:
"root"
,
"workdir"
:
"/
root
/jenkins/workspace"
,
"workdir"
:
"/
var/data
/jenkins/workspace"
,
"thread"
:
25
},
{
"host"
:
"192.168.0.212"
,
"username"
:
"root"
,
"workdir"
:
"/
root
/jenkins/workspace"
,
"workdir"
:
"/
var/data
/jenkins/workspace"
,
"thread"
:
25
},
{
"host"
:
"192.168.0.213"
,
"username"
:
"root"
,
"workdir"
:
"/
root
/jenkins/workspace"
,
"workdir"
:
"/
var/data
/jenkins/workspace"
,
"thread"
:
25
},
{
"host"
:
"192.168.0.214"
,
"username"
:
"root"
,
"workdir"
:
"/
root
/jenkins/workspace"
,
"workdir"
:
"/
var/data
/jenkins/workspace"
,
"thread"
:
25
}]
tests/parallel_test/run.sh
浏览文件 @
8e031df6
...
...
@@ -269,7 +269,9 @@ function run_thread() {
local
corefile
=
`
ls
$log_dir
/
${
case_file
}
.coredump/
`
corefile
=
`
find
$log_dir
/
${
case_file
}
.coredump/
-name
"core.*"
`
echo
-e
"
$case_info
\e
[31m failed
\e
[0m"
echo
"=========================log============================"
cat
$log_dir
/
$case_file
.log
echo
"====================================================="
echo
-e
"
\e
[34m log file:
$log_dir
/
$case_file
.log
\e
[0m"
if
[
!
-z
$corefile
]
;
then
echo
-e
"
\e
[34m corefiles:
$corefile
\e
[0m"
...
...
@@ -347,4 +349,6 @@ fi
echo
"
${
log_dir
}
"
>
&2
date
exit
$RET
tests/parallel_test/run_container.sh
浏览文件 @
8e031df6
...
...
@@ -97,3 +97,6 @@ docker run \
-e
PATH
=
/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:
$CONTAINER_TESTDIR
/debug/build/bin:/usr/local/go/bin:/usr/local/node-v12.20.0-linux-x64/bin:/usr/local/apache-maven-3.8.4/bin:/usr/local/jdk1.8.0_144/bin
\
-e
JAVA_HOME
=
/usr/local/jdk1.8.0_144
\
--rm
--ulimit
core
=
-1
taos_test:v1.0
$CONTAINER_TESTDIR
/tests/parallel_test/run_case.sh
-d
"
$exec_dir
"
-c
"
$cmd
"
ret
=
$?
exit
$ret
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录