Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
147f5af9
T
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1192
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看板
提交
147f5af9
编写于
12月 17, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
adjust sim script
上级
8940eb4d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
25 addition
and
28 deletion
+25
-28
CMakeLists.txt
CMakeLists.txt
+1
-1
tests/script/sh/deploy.sh
tests/script/sh/deploy.sh
+6
-3
tests/script/sh/exec.sh
tests/script/sh/exec.sh
+7
-4
tests/script/test.sh
tests/script/test.sh
+5
-20
tests/tsim/src/simSystem.c
tests/tsim/src/simSystem.c
+6
-0
未找到文件。
CMakeLists.txt
浏览文件 @
147f5af9
...
...
@@ -31,4 +31,4 @@ add_subdirectory(tests)
# docs
add_subdirectory
(
docs
)
# tests (TODO)
\ No newline at end of file
# tests (TODO)
tests/script/sh/deploy.sh
浏览文件 @
147f5af9
#!/bin/bash
set
+e
#set -x
echo
"Executing deploy.sh"
if
[
$#
!=
4
]
;
then
...
...
@@ -50,12 +53,12 @@ else
fi
if
[[
"
$TAOSD_DIR
"
==
*
"
$IN_TDINTERNAL
"
*
]]
;
then
BIN_DIR
=
`
find
.
-name
"taosd"
|grep
bin
|head
-n1
|cut
-d
'/'
${
cut_opt
}
2,3
`
BIN_DIR
=
`
find
.
-name
"taosd"
|grep
source
|head
-n1
|cut
-d
'/'
${
cut_opt
}
2,3
`
else
BIN_DIR
=
`
find
.
-name
"taosd"
|grep
bin
|head
-n1
|cut
-d
'/'
${
cut_opt
}
2
`
BIN_DIR
=
`
find
.
-name
"taosd"
|grep
source
|head
-n1
|cut
-d
'/'
${
cut_opt
}
2
`
fi
BUILD_DIR
=
$TAOS_DIR
/
$BIN_DIR
/build
BUILD_DIR
=
$TAOS_DIR
/
$BIN_DIR
SIM_DIR
=
$TAOS_DIR
/sim
...
...
tests/script/sh/exec.sh
浏览文件 @
147f5af9
...
...
@@ -8,6 +8,9 @@
# exit 1
# fi
set
+e
set
-x
UNAME_BIN
=
`
which
uname
`
OS_TYPE
=
`
$UNAME_BIN
`
...
...
@@ -62,16 +65,16 @@ else
fi
if
[[
"
$TAOSD_DIR
"
==
*
"
$IN_TDINTERNAL
"
*
]]
;
then
BIN_DIR
=
`
find
.
-name
"taosd"
|grep
bin
|head
-n1
|cut
-d
'/'
${
cut_opt
}
2,3
`
BIN_DIR
=
`
find
.
-name
"taosd"
|grep
source
|head
-n1
|cut
-d
'/'
${
cut_opt
}
2,3
`
else
BIN_DIR
=
`
find
.
-name
"taosd"
|grep
bin
|head
-n1
|cut
-d
'/'
${
cut_opt
}
2
`
BIN_DIR
=
`
find
.
-name
"taosd"
|grep
source
|head
-n1
|cut
-d
'/'
${
cut_opt
}
2
`
fi
BUILD_DIR
=
$TAOS_DIR
/
$BIN_DIR
/build
BUILD_DIR
=
$TAOS_DIR
/
$BIN_DIR
SIM_DIR
=
$TAOS_DIR
/sim
NODE_DIR
=
$SIM_DIR
/
$NODE_NAME
EXE_DIR
=
$BUILD_DIR
/
bi
n
EXE_DIR
=
$BUILD_DIR
/
source/dnode/mgmt/daemo
n
CFG_DIR
=
$NODE_DIR
/cfg
LOG_DIR
=
$NODE_DIR
/log
DATA_DIR
=
$NODE_DIR
/data
...
...
tests/script/test.sh
浏览文件 @
147f5af9
...
...
@@ -22,9 +22,6 @@ do
f
)
FILE_NAME
=
$OPTARG
;;
a
)
ASYNC
=
1
;;
v
)
VALGRIND
=
1
;;
...
...
@@ -60,32 +57,22 @@ else
fi
if
[[
"
$TAOSD_DIR
"
==
*
"
$IN_TDINTERNAL
"
*
]]
;
then
BIN_DIR
=
`
find
.
-name
"taosd"
|grep
bin
|head
-n1
|cut
-d
'/'
${
cut_opt
}
2,3
`
BIN_DIR
=
`
find
.
-name
"taosd"
|grep
source
|head
-n1
|cut
-d
'/'
${
cut_opt
}
2,3
`
else
BIN_DIR
=
`
find
.
-name
"taosd"
|grep
bin
|head
-n1
|cut
-d
'/'
${
cut_opt
}
2
`
BIN_DIR
=
`
find
.
-name
"taosd"
|grep
source
|head
-n1
|cut
-d
'/'
${
cut_opt
}
2
`
fi
BUILD_DIR
=
$TOP_DIR
/
$BIN_DIR
/build
BUILD_DIR
=
$TOP_DIR
/
$BIN_DIR
SIM_DIR
=
$TOP_DIR
/sim
if
[
$ASYNC
-eq
0
]
;
then
PROGRAM
=
$BUILD_DIR
/bin/tsim
else
PROGRAM
=
"
$BUILD_DIR
/bin/tsim -a"
fi
PROGRAM
=
$BUILD_DIR
/tests/tsim/tsim
PRG_DIR
=
$SIM_DIR
/tsim
CFG_DIR
=
$PRG_DIR
/cfg
LOG_DIR
=
$PRG_DIR
/log
DATA_DIR
=
$PRG_DIR
/data
ARBITRATOR_PRG_DIR
=
$SIM_DIR
/arbitrator
ARBITRATOR_LOG_DIR
=
$ARBITRATOR_PRG_DIR
/log
chmod
-R
777
$PRG_DIR
echo
"------------------------------------------------------------------------"
echo
"Start TDengine Testing Case ..."
...
...
@@ -96,12 +83,10 @@ echo "CFG_DIR : $CFG_DIR"
rm
-rf
$LOG_DIR
rm
-rf
$CFG_DIR
rm
-rf
$ARBITRATOR_LOG_DIR
mkdir
-p
$PRG_DIR
mkdir
-p
$LOG_DIR
mkdir
-p
$CFG_DIR
mkdir
-p
$ARBITRATOR_LOG_DIR
TAOS_CFG
=
$PRG_DIR
/cfg/taos.cfg
touch
-f
$TAOS_CFG
...
...
@@ -115,7 +100,7 @@ echo "secondEp ${HOSTNAME}:7200" >> $TAOS_CFG
echo
"serverPort 7100"
>>
$TAOS_CFG
echo
"dataDir
$DATA_DIR
"
>>
$TAOS_CFG
echo
"logDir
$LOG_DIR
"
>>
$TAOS_CFG
echo
"scriptDir
${
CODE_DIR
}
/../script"
>>
$TAOS_CFG
echo
"scriptDir
${
CODE_DIR
}
"
>>
$TAOS_CFG
echo
"numOfLogLines 100000000"
>>
$TAOS_CFG
echo
"rpcDebugFlag 143"
>>
$TAOS_CFG
echo
"tmrDebugFlag 131"
>>
$TAOS_CFG
...
...
tests/tsim/src/simSystem.c
浏览文件 @
147f5af9
...
...
@@ -21,6 +21,8 @@
#include "tglobal.h"
#include "ttimer.h"
#include "tutil.h"
#include "tglobal.h"
#include "tconfig.h"
SScript
*
simScriptList
[
MAX_MAIN_SCRIPT_NUM
];
SCommand
simCmdList
[
SIM_CMD_END
];
...
...
@@ -80,6 +82,10 @@ char *simParseHostName(char *varName) {
bool
simSystemInit
()
{
taosGetFqdn
(
simHostName
);
taosInitGlobalCfg
();
taosReadCfgFromFile
();
simInitsimCmdList
();
memset
(
simScriptList
,
0
,
sizeof
(
SScript
*
)
*
MAX_MAIN_SCRIPT_NUM
);
return
true
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录