Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
058cec47
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
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看板
提交
058cec47
编写于
3月 08, 2022
作者:
T
tangfangzhi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add container build; support case running default timeout
上级
1fac16dc
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
100 addition
and
33 deletion
+100
-33
tests/parallel_test/arm.cases.task
tests/parallel_test/arm.cases.task
+19
-0
tests/parallel_test/arm.json
tests/parallel_test/arm.json
+6
-0
tests/parallel_test/container_build.sh
tests/parallel_test/container_build.sh
+51
-0
tests/parallel_test/run.sh
tests/parallel_test/run.sh
+11
-3
tests/parallel_test/run_case.sh
tests/parallel_test/run_case.sh
+7
-20
tests/parallel_test/run_container.sh
tests/parallel_test/run_container.sh
+6
-10
未找到文件。
tests/parallel_test/arm.cases.task
0 → 100644
浏览文件 @
058cec47
4,,pytest,python3 test.py -f insert/double.py
4,,pytest,python3 test.py -f insert/date.py
4,,pytest,python3 test.py -f insert/bug3654.py
4,,pytest,python3 test.py -f insert/bool.py
4,,pytest,python3 test.py -f insert/bigint.py
4,,pytest,python3 test.py -f insert/basic.py
4,,pytest,python3 test.py -f insert/alterTableAndInsert.py
4,,pytest,python3 test.py -f import_merge/importHeadPartOverlap.py
4,,pytest,python3 test.py -f functions/function_stddev_td2555.py
4,,pytest,python3 test.py -f dbmgmt/nanoSecondCheck.py
4,,pytest,python3 bug2265.py
4,,pytest,python3 test.py -f alter/alterTabAddTagWithNULL.py
4,,pytest,python3 test.py -f alter/alter_debugFlag.py
4,,pytest,python3 test.py -f alter/alter_create_exception.py
3,,pytest,python3 test.py -f tag_lite/binary.py
3,,pytest,python3 test.py -f query/filterAllIntTypes.py
3,,develop-test,python3 ./test.py -f 2-query/ts_hidden_column.py
#3,,script,./test.sh -f general/compute/scalar_triangle.sim
3,,script,./test.sh -f general/compute/scalar_str_concat_len.sim
tests/parallel_test/arm.json
0 → 100644
浏览文件 @
058cec47
[{
"host"
:
"192.168.1.207"
,
"username"
:
"root"
,
"workdir"
:
"/var/data/jenkins/workspace"
,
"thread"
:
2
}]
tests/parallel_test/container_build.sh
0 → 100755
浏览文件 @
058cec47
#!/bin/bash
function
usage
()
{
echo
"
$0
"
echo
-e
"
\t
-w work dir"
echo
-e
"
\t
-c community version"
echo
-e
"
\t
-t make thread count"
echo
-e
"
\t
-h help"
}
while
getopts
"w:t:ch"
opt
;
do
case
$opt
in
w
)
WORKDIR
=
$OPTARG
;;
c
)
COMMUNITY
=
community
;;
t
)
THREAD_COUNT
=
$OPTARG
;;
h
)
usage
exit
0
;;
\?
)
echo
"Invalid option: -
$OPTARG
"
usage
exit
0
;;
esac
done
if
[
-z
"
$WORKDIR
"
]
;
then
usage
exit
1
fi
if
[
-z
"
$THREAD_COUNT
"
]
;
then
THREAD_COUNT
=
1
fi
ulimit
-c
unlimited
INTERNAL_REPDIR
=
$WORKDIR
/TDinternal
docker run
\
-v
$INTERNAL_REPDIR
:/home
\
--rm
--ulimit
core
=
-1
taos_test:v1.0 sh
-c
"cd /home/
$COMMUNITY
;rm -rf debug;mkdir -p debug;cd debug;cmake .. -DBUILD_HTTP=false -DBUILD_TOOLS=true;make -j
$THREAD_COUNT
"
ret
=
$?
exit
$ret
tests/parallel_test/run.sh
浏览文件 @
058cec47
...
...
@@ -6,10 +6,11 @@ function usage() {
echo
-e
"
\t
-t task file"
echo
-e
"
\t
-b branch"
echo
-e
"
\t
-l log dir"
echo
-e
"
\t
-o default timeout value"
echo
-e
"
\t
-h help"
}
while
getopts
"m:t:b:l:h"
opt
;
do
while
getopts
"m:t:b:l:
o:
h"
opt
;
do
case
$opt
in
m
)
config_file
=
$OPTARG
...
...
@@ -23,6 +24,9 @@ while getopts "m:t:b:l:h" opt; do
l
)
log_dir
=
$OPTARG
;;
o
)
timeout_param
=
"-o
$OPTARG
"
;;
h
)
usage
exit
0
...
...
@@ -201,18 +205,21 @@ function run_thread() {
if
[
-z
"
$case_file
"
]
;
then
continue
fi
case_file
=
"
$exec_dir
/
${
case_file
}
.
${
index
}
.
${
thread_no
}
"
case_file
=
"
$exec_dir
/
${
case_file
}
.
${
index
}
.
${
thread_no
}
.
${
count
}
"
count
=
$((
count
+
1
))
local
case_path
=
`
dirname
"
$case_file
"
`
if
[
!
-z
"
$case_path
"
]
;
then
mkdir
-p
$log_dir
/
$case_path
fi
cmd
=
"
${
runcase_script
}
${
script
}
-w
${
workdirs
[index]
}
-c
\"
${
case_cmd
}
\"
-t
${
thread_no
}
-d
${
exec_dir
}
"
cmd
=
"
${
runcase_script
}
${
script
}
-w
${
workdirs
[index]
}
-c
\"
${
case_cmd
}
\"
-t
${
thread_no
}
-d
${
exec_dir
}
${
timeout_param
}
"
# echo "$thread_no $count $cmd"
local
ret
=
0
local
redo_count
=
1
start_time
=
`
date
+%s
`
while
[
${
redo_count
}
-lt
6
]
;
do
if
[
-f
$log_dir
/
$case_file
.log
]
;
then
cp
$log_dir
/
$case_file
.log
$log_dir
/
$case_file
.
${
redo_count
}
.redolog
fi
echo
"
${
hosts
[index]
}
-
${
thread_no
}
order:
${
count
}
, redo:
${
redo_count
}
task:
${
line
}
"
>
$log_dir
/
$case_file
.log
echo
-e
"
\e
[33m >>>>>
\e
[0m
${
case_cmd
}
"
date
>>
$log_dir
/
$case_file
.log
...
...
@@ -220,6 +227,7 @@ function run_thread() {
# ret=${PIPESTATUS[0]}
$cmd
>>
$log_dir
/
$case_file
.log 2>&1
ret
=
$?
echo
"
${
hosts
[index]
}
`
date
`
ret:
${
ret
}
"
>>
$log_dir
/
$case_file
.log
if
[
$ret
-eq
0
]
;
then
break
fi
...
...
tests/parallel_test/run_case.sh
浏览文件 @
058cec47
#!/bin/bash
CONTAINER_TESTDIR
=
/home/community
# CONTAINER_TESTDIR=/root/tang/repository/TDengine
# export PATH=$PATH:$CONTAINER_TESTDIR/debug/build/bin
function
usage
()
{
echo
"
$0
"
echo
-e
"
\t
-d execution dir"
echo
-e
"
\t
-c command"
echo
-e
"
\t
-o default timeout value"
echo
-e
"
\t
-h help"
}
while
getopts
"d:c:h"
opt
;
do
while
getopts
"d:c:
o:
h"
opt
;
do
case
$opt
in
d
)
exec_dir
=
$OPTARG
...
...
@@ -20,6 +18,9 @@ while getopts "d:c:h" opt; do
c
)
cmd
=
$OPTARG
;;
o
)
TIMEOUT_CMD
=
"timeout
$OPTARG
"
;;
h
)
usage
exit
0
...
...
@@ -41,29 +42,15 @@ if [ -z "$cmd" ]; then
exit
0
fi
go
env
-w
GOPROXY
=
https://goproxy.cn
echo
"StrictHostKeyChecking no"
>>
/etc/ssh/ssh_config
export
PATH
=
$PATH
:/home/debug/build/bin
ln
-s
/home/debug/build/lib/libtaos.so /usr/lib/libtaos.so 2>/dev/null
npm config
-g
set
unsafe-perm
npm config
-g
set
registry https://registry.npm.taobao.org
mkdir
-p
/home/sim/tsim
mkdir
-p
/var/lib/taos/subscribe
rm
-rf
${
CONTAINER_TESTDIR
}
/src/connector/nodejs/node_modules
rm
-rf
${
CONTAINER_TESTDIR
}
/tests/examples/nodejs/node_modules
rm
-rf
${
CONTAINER_TESTDIR
}
/tests/connectorTest/nodejsTest/nanosupport/node_modules
# ln -s /home/node_modules ${CONTAINER_TESTDIR}/src/connector/nodejs/
# ln -s /home/node_modules ${CONTAINER_TESTDIR}/tests/examples/nodejs/
# ln -s /home/node_modules ${CONTAINER_TESTDIR}/tests/connectorTest/nodejsTest/nanosupport/
# echo "$cmd"|grep -q "nodejs"
# if [ $? -eq 0 ]; then
# cd $CONTAINER_TESTDIR/src/connector/nodejs
# npm install node-gyp-build@4.3.0 --ignore-scripts
# fi
cd
$CONTAINER_TESTDIR
/tests/
$exec_dir
ulimit
-c
unlimited
$cmd
$
TIMEOUT_CMD
$
cmd
RET
=
$?
if
[
$RET
-ne
0
]
;
then
...
...
tests/parallel_test/run_container.sh
浏览文件 @
058cec47
...
...
@@ -6,10 +6,11 @@ function usage() {
echo
-e
"
\t
-d execution dir"
echo
-e
"
\t
-c command"
echo
-e
"
\t
-t thread number"
echo
-e
"
\t
-o default timeout value"
echo
-e
"
\t
-h help"
}
while
getopts
"w:d:c:t:h"
opt
;
do
while
getopts
"w:d:c:t:
o:
h"
opt
;
do
case
$opt
in
w
)
WORKDIR
=
$OPTARG
...
...
@@ -23,6 +24,9 @@ while getopts "w:d:c:t:h" opt; do
t
)
thread_no
=
$OPTARG
;;
o
)
timeout_param
=
"-o
$OPTARG
"
;;
h
)
usage
exit
0
...
...
@@ -71,12 +75,6 @@ if [ ! -d "${TMP_DIR}/thread_volume/$thread_no/$exec_dir" ]; then
fi
MOUNT_DIR
=
"
$TMP_DIR
/thread_volume/
$thread_no
/
$exec_dir
:
$CONTAINER_TESTDIR
/tests/
$exec_dir
"
echo
"
$thread_no
->
${
exec_dir
}
:
$cmd
"
echo
"
$cmd
"
|grep
-q
"nodejs"
if
[
$?
-eq
0
]
;
then
MOUNT_NODE_MOD
=
"-v
$TMP_DIR
/thread_volume/
$thread_no
/node_modules:
${
CONTAINER_TESTDIR
}
/src/connector/nodejs/node_modules
\
-v
$TMP_DIR
/thread_volume/
$thread_no
/node_modules:
${
CONTAINER_TESTDIR
}
/tests/examples/nodejs/node_modules
\
-v
$TMP_DIR
/thread_volume/
$thread_no
/node_modules:
${
CONTAINER_TESTDIR
}
/tests/connectorTest/nodejsTest/nanosupport/node_modules"
fi
if
[
-f
"
$REPDIR
/src/plugins/taosadapter/example/config/taosadapter.toml"
]
;
then
TAOSADAPTER_TOML
=
"-v
$REPDIR
/src/plugins/taosadapter/example/config/taosadapter.toml:/etc/taos/taosadapter.toml:ro"
fi
...
...
@@ -99,9 +97,7 @@ docker run \
-v
$REPDIR
/README.md:
$CONTAINER_TESTDIR
/README.md:ro
\
-v
$REPDIR
/src/connector/python/taos:/usr/local/lib/python3.8/site-packages/taos:ro
\
-e
LD_LIBRARY_PATH
=
/home/debug/build/lib:/home/debug/build/lib64
\
-e
PATH
=
/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/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
"
--rm
--ulimit
core
=
-1
taos_test:v1.0
$CONTAINER_TESTDIR
/tests/parallel_test/run_case.sh
-d
"
$exec_dir
"
-c
"
$cmd
"
$timeout_param
ret
=
$?
exit
$ret
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录