Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5a2a34f1
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看板
提交
5a2a34f1
编写于
4月 01, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add multiprocess mode to CI
上级
e1660a12
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
46 addition
and
27 deletion
+46
-27
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+7
-0
tests/script/sh/deploy.sh
tests/script/sh/deploy.sh
+6
-9
tests/script/test.sh
tests/script/test.sh
+12
-4
tests/tsim/inc/simInt.h
tests/tsim/inc/simInt.h
+1
-0
tests/tsim/src/simExe.c
tests/tsim/src/simExe.c
+17
-14
tests/tsim/src/simMain.c
tests/tsim/src/simMain.c
+3
-0
未找到文件。
tests/script/jenkins/basic.txt
浏览文件 @
5a2a34f1
...
...
@@ -50,4 +50,11 @@
./test.sh -f tsim/stable/values.sim
./test.sh -f tsim/stable/vnode3.sim
# --- for multi process mode
./test.sh -f tsim/user/basic1.sim -m
./test.sh -f tsim/insert/basic1.sim -m
./test.sh -f tsim/stable/vnode3.sim -m
./test.sh -f tsim/tmq/basic.sim -m
#======================b1-end===============
tests/script/sh/deploy.sh
浏览文件 @
5a2a34f1
...
...
@@ -5,18 +5,12 @@ set +e
echo
"Executing deploy.sh"
if
[
$#
!=
4
]
;
then
echo
"argument list need input : "
echo
" -n nodeName"
echo
" -i nodePort"
exit
1
fi
UNAME_BIN
=
`
which
uname
`
OS_TYPE
=
`
$UNAME_BIN
`
NODE_NAME
=
NODE
=
while
getopts
"n:i:"
arg
MULTIPROCESS
=
0
while
getopts
"n:i:m"
arg
do
case
$arg
in
n
)
...
...
@@ -25,6 +19,9 @@ do
i
)
NODE
=
$OPTARG
;;
m
)
MULTIPROCESS
=
1
;;
?
)
echo
"unkonw argument"
;;
...
...
@@ -145,5 +142,5 @@ echo "statusInterval 1" >> $TAOS_CFG
echo
"asyncLog 0"
>>
$TAOS_CFG
echo
"locale en_US.UTF-8"
>>
$TAOS_CFG
echo
"telemetryReporting 0"
>>
$TAOS_CFG
echo
"multiProcess
0"
>>
$TAOS_CFG
echo
"multiProcess
${
MULTIPROCESS
}
"
>>
$TAOS_CFG
echo
" "
>>
$TAOS_CFG
tests/script/test.sh
浏览文件 @
5a2a34f1
...
...
@@ -7,7 +7,6 @@
##################################################
set
+e
#set -x
FILE_NAME
=
RELEASE
=
0
...
...
@@ -16,7 +15,8 @@ VALGRIND=0
UNIQUE
=
0
UNAME_BIN
=
`
which
uname
`
OS_TYPE
=
`
$UNAME_BIN
`
while
getopts
"f:avu"
arg
MULTIPROCESS
=
1
while
getopts
"f:avum"
arg
do
case
$arg
in
f
)
...
...
@@ -28,6 +28,9 @@ do
u
)
UNIQUE
=
1
;;
m
)
MULTIPROCESS
=
1
;;
?
)
echo
"unknow argument"
;;
...
...
@@ -125,8 +128,13 @@ if [ -n "$FILE_NAME" ]; then
echo
valgrind
--tool
=
memcheck
--leak-check
=
full
--show-reachable
=
no
--track-origins
=
yes
--show-leak-kinds
=
all
-v
--workaround-gcc296-bugs
=
yes
--log-file
=
${
CODE_DIR
}
/../script/valgrind.log
$PROGRAM
-c
$CFG_DIR
-f
$FILE_NAME
valgrind
--tool
=
memcheck
--leak-check
=
full
--show-reachable
=
no
--track-origins
=
yes
--show-leak-kinds
=
all
-v
--workaround-gcc296-bugs
=
yes
--log-file
=
${
CODE_DIR
}
/../script/valgrind.log
$PROGRAM
-c
$CFG_DIR
-f
$FILE_NAME
else
echo
"ExcuteCmd:"
$PROGRAM
-c
$CFG_DIR
-f
$FILE_NAME
$PROGRAM
-c
$CFG_DIR
-f
$FILE_NAME
if
[[
$MULTIPROCESS
-eq
1
]]
;
then
echo
"ExcuteCmd(multiprocess):"
$PROGRAM
-m
-c
$CFG_DIR
-f
$FILE_NAME
$PROGRAM
-m
-c
$CFG_DIR
-f
$FILE_NAME
else
echo
"ExcuteCmd(singleprocess):"
$PROGRAM
-c
$CFG_DIR
-f
$FILE_NAME
$PROGRAM
-c
$CFG_DIR
-f
$FILE_NAME
fi
fi
else
echo
"ExcuteCmd:"
$PROGRAM
-c
$CFG_DIR
-f
basicSuite.sim
...
...
tests/tsim/inc/simInt.h
浏览文件 @
5a2a34f1
...
...
@@ -155,6 +155,7 @@ extern int32_t simScriptSucced;
extern
int32_t
simDebugFlag
;
extern
char
simScriptDir
[];
extern
bool
abortExecution
;
extern
bool
useMultiProcess
;
SScript
*
simParseScript
(
char
*
fileName
);
SScript
*
simProcessCallOver
(
SScript
*
script
);
...
...
tests/tsim/src/simExe.c
浏览文件 @
5a2a34f1
...
...
@@ -305,25 +305,24 @@ bool simExecuteRunBackCmd(SScript *script, char *option) {
return
true
;
}
void
simReplaceShToBat
(
char
*
dst
)
{
char
*
sh
=
strstr
(
dst
,
".sh"
);
if
(
sh
!=
NULL
)
{
void
simReplaceStr
(
char
*
buf
,
char
*
src
,
char
*
dst
)
{
char
*
begin
=
strstr
(
buf
,
src
);
if
(
begin
!=
NULL
)
{
int32_t
srcLen
=
(
int32_t
)
strlen
(
src
);
int32_t
dstLen
=
(
int32_t
)
strlen
(
dst
);
char
*
end
=
dst
+
dstLen
;
*
(
end
+
1
)
=
0
;
int32_t
interval
=
(
dstLen
-
srcLen
);
int32_t
remainLen
=
(
int32_t
)
strlen
(
buf
);
char
*
end
=
buf
+
remainLen
;
*
(
end
+
interval
)
=
0
;
for
(
char
*
p
=
end
;
p
>=
sh
;
p
--
)
{
*
(
p
+
1
)
=
*
p
;
for
(
char
*
p
=
end
;
p
>=
begin
;
p
--
)
{
*
(
p
+
interval
)
=
*
p
;
}
sh
[
0
]
=
'.'
;
sh
[
1
]
=
'b'
;
sh
[
2
]
=
'a'
;
sh
[
3
]
=
't'
;
sh
[
4
]
=
' '
;
memcpy
(
begin
,
dst
,
dstLen
);
}
sim
Debug
(
"system cmd is %s"
,
dst
);
sim
Info
(
"system cmd is %s"
,
buf
);
}
bool
simExecuteSystemCmd
(
SScript
*
script
,
char
*
option
)
{
...
...
@@ -334,9 +333,13 @@ bool simExecuteSystemCmd(SScript *script, char *option) {
simVisuallizeOption
(
script
,
option
,
buf
+
strlen
(
buf
));
#else
sprintf
(
buf
,
"%s%s"
,
simScriptDir
,
option
);
simReplaceS
hToBat
(
buf
);
simReplaceS
tr
(
buf
,
".sh"
,
".bat"
);
#endif
if
(
useMultiProcess
)
{
simReplaceStr
(
buf
,
"deploy.sh"
,
"deploy.sh -m"
);
}
simLogSql
(
buf
,
true
);
int32_t
code
=
system
(
buf
);
int32_t
repeatTimes
=
0
;
...
...
tests/tsim/src/simMain.c
浏览文件 @
5a2a34f1
...
...
@@ -18,6 +18,7 @@
bool
simExecSuccess
=
false
;
bool
abortExecution
=
false
;
bool
useMultiProcess
=
false
;
void
simHandleSignal
(
int32_t
signo
,
void
*
sigInfo
,
void
*
context
)
{
simSystemCleanUp
();
...
...
@@ -32,6 +33,8 @@ int32_t main(int32_t argc, char *argv[]) {
tstrncpy
(
configDir
,
argv
[
++
i
],
128
);
}
else
if
(
strcmp
(
argv
[
i
],
"-f"
)
==
0
&&
i
<
argc
-
1
)
{
strcpy
(
scriptFile
,
argv
[
++
i
]);
}
else
if
(
strcmp
(
argv
[
i
],
"-m"
)
==
0
)
{
useMultiProcess
=
true
;
}
else
{
printf
(
"usage: %s [options]
\n
"
,
argv
[
0
]);
printf
(
" [-c config]: config directory, default is: %s
\n
"
,
configDir
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录