Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e221d46c
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看板
提交
e221d46c
编写于
1月 28, 2022
作者:
T
tangfangzhi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add arm, macos build test
上级
613b844b
变更
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
浏览文件 @
e221d46c
...
@@ -4,7 +4,10 @@ import jenkins.model.CauseOfInterruption
...
@@ -4,7 +4,10 @@ import jenkins.model.CauseOfInterruption
node
{
node
{
}
}
def
sync_source
()
{
def
sync_source
()
{
sh
'hostname'
sh
'''
hostname
date
'''
sh
'''
sh
'''
cd ${WKC}
cd ${WKC}
[ -f src/connector/grafanaplugin/README.md ] && rm -f src/connector/grafanaplugin/README.md > /dev/null || echo "failed to remove grafanaplugin README.md"
[ -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() {
...
@@ -40,7 +43,7 @@ def sync_source() {
git pull >/dev/null
git pull >/dev/null
git fetch origin +refs/pull/${CHANGE_ID}/merge
git fetch origin +refs/pull/${CHANGE_ID}/merge
git checkout -qf FETCH_HEAD
git checkout -qf FETCH_HEAD
echo "// git clean -dfx"
git clean -dfx
git submodule update --init --recursive
git submodule update --init --recursive
cd ${WK}
cd ${WK}
git reset --hard HEAD~10
git reset --hard HEAD~10
...
@@ -73,7 +76,7 @@ def sync_source() {
...
@@ -73,7 +76,7 @@ def sync_source() {
git pull >/dev/null
git pull >/dev/null
export TZ=Asia/Harbin
export TZ=Asia/Harbin
date
date
echo "// git clean -dfx"
git clean -dfx
'''
'''
}
}
def
pre_test
()
{
def
pre_test
()
{
...
@@ -82,11 +85,23 @@ def pre_test() {
...
@@ -82,11 +85,23 @@ def pre_test() {
cd ${WK}
cd ${WK}
mkdir -p debug
mkdir -p debug
cd 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
cmake .. -DBUILD_HTTP=false -DBUILD_TOOLS=true > /dev/null
make -j8> /dev/null
make -j8 >/dev/null
echo "make install > /dev/null"
'''
cd ${WKC}/tests
return
1
echo "pip3 install ${WKC}/src/connector/python/"
}
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
return
1
}
}
...
@@ -94,9 +109,9 @@ pipeline {
...
@@ -94,9 +109,9 @@ pipeline {
agent
{
label
" dispatcher "
}
agent
{
label
" dispatcher "
}
options
{
skipDefaultCheckout
()
}
options
{
skipDefaultCheckout
()
}
environment
{
environment
{
WK
=
'/
root
/jenkins/workspace/TDinternal'
WK
=
'/
var/data
/jenkins/workspace/TDinternal'
WKC
=
'/
root
/jenkins/workspace/TDinternal/community'
WKC
=
'/
var/data
/jenkins/workspace/TDinternal/community'
LOGDIR
=
'/
root
/jenkins/workspace/log'
LOGDIR
=
'/
var/data
/jenkins/workspace/log'
}
}
stages
{
stages
{
stage
(
'pre_build'
)
{
stage
(
'pre_build'
)
{
...
@@ -121,8 +136,8 @@ pipeline {
...
@@ -121,8 +136,8 @@ pipeline {
parallel
{
parallel
{
stage
(
'dispatcher sync source'
)
{
stage
(
'dispatcher sync source'
)
{
steps
{
steps
{
sync_source
()
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
timeout
(
time:
100
,
unit:
'MINUTES'
)
{
sync_source
()
script
{
script
{
sh
'''
sh
'''
echo "dispatcher ready"
echo "dispatcher ready"
...
@@ -135,8 +150,8 @@ pipeline {
...
@@ -135,8 +150,8 @@ pipeline {
stage
(
'build worker01'
)
{
stage
(
'build worker01'
)
{
agent
{
label
" worker01 "
}
agent
{
label
" worker01 "
}
steps
{
steps
{
pre_test
()
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
timeout
(
time:
100
,
unit:
'MINUTES'
)
{
pre_test
()
script
{
script
{
sh
'''
sh
'''
echo "worker01 build done"
echo "worker01 build done"
...
@@ -149,8 +164,8 @@ pipeline {
...
@@ -149,8 +164,8 @@ pipeline {
stage
(
'build worker02'
)
{
stage
(
'build worker02'
)
{
agent
{
label
" worker02 "
}
agent
{
label
" worker02 "
}
steps
{
steps
{
pre_test
()
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
timeout
(
time:
100
,
unit:
'MINUTES'
)
{
pre_test
()
script
{
script
{
sh
'''
sh
'''
echo "worker02 build done"
echo "worker02 build done"
...
@@ -163,8 +178,8 @@ pipeline {
...
@@ -163,8 +178,8 @@ pipeline {
stage
(
'build worker03'
)
{
stage
(
'build worker03'
)
{
agent
{
label
" worker03 "
}
agent
{
label
" worker03 "
}
steps
{
steps
{
pre_test
()
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
timeout
(
time:
100
,
unit:
'MINUTES'
)
{
pre_test
()
script
{
script
{
sh
'''
sh
'''
echo "worker03 build done"
echo "worker03 build done"
...
@@ -177,8 +192,8 @@ pipeline {
...
@@ -177,8 +192,8 @@ pipeline {
stage
(
'build worker04'
)
{
stage
(
'build worker04'
)
{
agent
{
label
" worker04 "
}
agent
{
label
" worker04 "
}
steps
{
steps
{
pre_test
()
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
timeout
(
time:
100
,
unit:
'MINUTES'
)
{
pre_test
()
script
{
script
{
sh
'''
sh
'''
echo "worker04 build done"
echo "worker04 build done"
...
@@ -191,8 +206,8 @@ pipeline {
...
@@ -191,8 +206,8 @@ pipeline {
stage
(
'build worker05'
)
{
stage
(
'build worker05'
)
{
agent
{
label
" worker05 "
}
agent
{
label
" worker05 "
}
steps
{
steps
{
pre_test
()
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
timeout
(
time:
100
,
unit:
'MINUTES'
)
{
pre_test
()
script
{
script
{
sh
'''
sh
'''
echo "worker05 build done"
echo "worker05 build done"
...
@@ -205,19 +220,65 @@ pipeline {
...
@@ -205,19 +220,65 @@ pipeline {
}
}
}
}
stage
(
'run test'
)
{
stage
(
'run test'
)
{
steps
{
parallel
{
sh
'''
stage
(
'build worker06_arm64'
)
{
date
agent
{
label
" worker06_arm64 "
}
hostname
steps
{
'''
timeout
(
time:
20
,
unit:
'MINUTES'
)
{
timeout
(
time:
100
,
unit:
'MINUTES'
)
{
pre_test
()
sh
'''
script
{
date
sh
'''
cd ${WKC}/tests/parallel_test
echo "worker06_arm64 build done"
time ./run.sh -m m.json -t cases.task -l ${LOGDIR} -b ${BRANCH_NAME}
date
date
'''
hostname
}
'''
}
}
}
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
浏览文件 @
e221d46c
[{
[{
"host"
:
"192.168.0.210"
,
"host"
:
"192.168.0.210"
,
"username"
:
"root"
,
"username"
:
"root"
,
"workdir"
:
"/
root
/jenkins/workspace"
,
"workdir"
:
"/
var/data
/jenkins/workspace"
,
"thread"
:
25
"thread"
:
25
},
},
{
{
"host"
:
"192.168.0.211"
,
"host"
:
"192.168.0.211"
,
"username"
:
"root"
,
"username"
:
"root"
,
"workdir"
:
"/
root
/jenkins/workspace"
,
"workdir"
:
"/
var/data
/jenkins/workspace"
,
"thread"
:
25
"thread"
:
25
},
},
{
{
"host"
:
"192.168.0.212"
,
"host"
:
"192.168.0.212"
,
"username"
:
"root"
,
"username"
:
"root"
,
"workdir"
:
"/
root
/jenkins/workspace"
,
"workdir"
:
"/
var/data
/jenkins/workspace"
,
"thread"
:
25
"thread"
:
25
},
},
{
{
"host"
:
"192.168.0.213"
,
"host"
:
"192.168.0.213"
,
"username"
:
"root"
,
"username"
:
"root"
,
"workdir"
:
"/
root
/jenkins/workspace"
,
"workdir"
:
"/
var/data
/jenkins/workspace"
,
"thread"
:
25
"thread"
:
25
},
},
{
{
"host"
:
"192.168.0.214"
,
"host"
:
"192.168.0.214"
,
"username"
:
"root"
,
"username"
:
"root"
,
"workdir"
:
"/
root
/jenkins/workspace"
,
"workdir"
:
"/
var/data
/jenkins/workspace"
,
"thread"
:
25
"thread"
:
25
}]
}]
tests/parallel_test/run.sh
浏览文件 @
e221d46c
...
@@ -269,7 +269,9 @@ function run_thread() {
...
@@ -269,7 +269,9 @@ function run_thread() {
local
corefile
=
`
ls
$log_dir
/
${
case_file
}
.coredump/
`
local
corefile
=
`
ls
$log_dir
/
${
case_file
}
.coredump/
`
corefile
=
`
find
$log_dir
/
${
case_file
}
.coredump/
-name
"core.*"
`
corefile
=
`
find
$log_dir
/
${
case_file
}
.coredump/
-name
"core.*"
`
echo
-e
"
$case_info
\e
[31m failed
\e
[0m"
echo
-e
"
$case_info
\e
[31m failed
\e
[0m"
echo
"=========================log============================"
cat
$log_dir
/
$case_file
.log
cat
$log_dir
/
$case_file
.log
echo
"====================================================="
echo
-e
"
\e
[34m log file:
$log_dir
/
$case_file
.log
\e
[0m"
echo
-e
"
\e
[34m log file:
$log_dir
/
$case_file
.log
\e
[0m"
if
[
!
-z
$corefile
]
;
then
if
[
!
-z
$corefile
]
;
then
echo
-e
"
\e
[34m corefiles:
$corefile
\e
[0m"
echo
-e
"
\e
[34m corefiles:
$corefile
\e
[0m"
...
@@ -347,4 +349,6 @@ fi
...
@@ -347,4 +349,6 @@ fi
echo
"
${
log_dir
}
"
>
&2
echo
"
${
log_dir
}
"
>
&2
date
exit
$RET
exit
$RET
tests/parallel_test/run_container.sh
浏览文件 @
e221d46c
...
@@ -97,3 +97,6 @@ docker run \
...
@@ -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
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
\
-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
"
--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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录