Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1ec52a7d
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看板
提交
1ec52a7d
编写于
9月 28, 2021
作者:
W
wpan
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into feature/TD-10396
上级
2220147e
5b24dfa1
变更
21
展开全部
隐藏空白更改
内联
并排
Showing
21 changed file
with
547 addition
and
269 deletion
+547
-269
cmake/define.inc
cmake/define.inc
+4
-0
cmake/input.inc
cmake/input.inc
+6
-0
packaging/tools/make_install.sh
packaging/tools/make_install.sh
+3
-1
src/client/CMakeLists.txt
src/client/CMakeLists.txt
+5
-1
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+7
-0
src/connector/grafanaplugin
src/connector/grafanaplugin
+1
-1
src/dnode/CMakeLists.txt
src/dnode/CMakeLists.txt
+5
-0
src/dnode/src/dnodeModule.c
src/dnode/src/dnodeModule.c
+2
-0
src/dnode/src/dnodeShell.c
src/dnode/src/dnodeShell.c
+2
-0
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+137
-113
src/kit/taosdump/taosdump.c
src/kit/taosdump/taosdump.c
+177
-134
src/plugins/CMakeLists.txt
src/plugins/CMakeLists.txt
+6
-2
tests/examples/c/makefile
tests/examples/c/makefile
+4
-13
tests/gotest/batchtest.bat
tests/gotest/batchtest.bat
+2
-2
tests/gotest/batchtest.sh
tests/gotest/batchtest.sh
+1
-1
tests/pytest/fulltest.sh
tests/pytest/fulltest.sh
+1
-0
tests/pytest/query/queryGroupbyWithInterval.py
tests/pytest/query/queryGroupbyWithInterval.py
+8
-0
tests/pytest/query/queryRegex.py
tests/pytest/query/queryRegex.py
+74
-0
tests/script/api/clientcfgtest.c
tests/script/api/clientcfgtest.c
+62
-0
tests/script/api/makefile
tests/script/api/makefile
+12
-1
tests/test-all.sh
tests/test-all.sh
+28
-0
未找到文件。
cmake/define.inc
浏览文件 @
1ec52a7d
...
...
@@ -124,6 +124,10 @@ IF (TD_APLHINE)
MESSAGE
(
STATUS
"aplhine is defined"
)
ENDIF
()
IF
(
TD_BUILD_HTTP
)
ADD_DEFINITIONS
(
-
DHTTP_EMBEDDED
)
ENDIF
()
IF
(
TD_LINUX
)
ADD_DEFINITIONS
(
-
DLINUX
)
ADD_DEFINITIONS
(
-
D_LINUX
)
...
...
cmake/input.inc
浏览文件 @
1ec52a7d
...
...
@@ -90,6 +90,12 @@ IF (${BUILD_JDBC} MATCHES "false")
SET
(
TD_BUILD_JDBC
FALSE
)
ENDIF
()
SET
(
TD_BUILD_HTTP
TRUE
)
IF
(
$
{
BUILD_HTTP
}
MATCHES
"false"
)
SET
(
TD_BUILD_HTTP
FALSE
)
ENDIF
()
SET
(
TD_MEMORY_SANITIZER
FALSE
)
IF
(
$
{
MEMORY_SANITIZER
}
MATCHES
"true"
)
SET
(
TD_MEMORY_SANITIZER
TRUE
)
...
...
packaging/tools/make_install.sh
浏览文件 @
1ec52a7d
...
...
@@ -245,8 +245,10 @@ function install_lib() {
else
${
csudo
}
cp
-Rf
${
binary_dir
}
/build/lib/libtaos.
${
verNumber
}
.dylib
${
install_main_dir
}
/driver
&&
${
csudo
}
chmod
777
${
install_main_dir
}
/driver/
*
${
csudo
}
ln
-sf
${
install_main_dir
}
/driver/libtaos.
*
${
install_main_dir
}
/driver/libtaos.1.dylib
||
:
${
csudo
}
ln
-sf
${
install_main_dir
}
/driver/libtaos.1.dylib
${
install_main_dir
}
/driver/libtaos.dylib
||
:
${
csudo
}
ln
-sf
${
install_main_dir
}
/driver/libtaos.
*
${
lib_link_dir
}
/libtaos.1.dylib
||
:
${
csudo
}
ln
-sf
${
lib_link_dir
}
/libtaos.1.dylib
${
lib_link_dir
}
/libtaos.dylib
||
:
${
csudo
}
ln
-sf
${
lib_link_dir
}
/libtaos.1.dylib
${
lib_link_dir
}
/libtaos.dylib
||
:
fi
install_jemalloc
...
...
src/client/CMakeLists.txt
浏览文件 @
1ec52a7d
...
...
@@ -5,7 +5,11 @@ INCLUDE_DIRECTORIES(inc)
INCLUDE_DIRECTORIES
(
jni
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/query/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/deps/zlib-1.2.11/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/plugins/http/inc
)
IF
(
TD_BUILD_HTTP
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/plugins/http/inc
)
ENDIF
()
AUX_SOURCE_DIRECTORY
(
src SRC
)
IF
(
TD_LINUX
)
...
...
src/client/src/tscUtil.c
浏览文件 @
1ec52a7d
...
...
@@ -29,7 +29,10 @@
#include "tsclient.h"
#include "ttimer.h"
#include "ttokendef.h"
#ifdef HTTP_EMBEDDED
#include "httpInt.h"
#endif
static
void
freeQueryInfoImpl
(
SQueryInfo
*
pQueryInfo
);
...
...
@@ -5197,11 +5200,14 @@ void tscRemoveCachedTableMeta(STableMetaInfo* pTableMetaInfo, uint64_t id) {
char
*
cloneCurrentDBName
(
SSqlObj
*
pSql
)
{
char
*
p
=
NULL
;
#ifdef HTTP_EMBEDDED
HttpContext
*
pCtx
=
NULL
;
#endif
pthread_mutex_lock
(
&
pSql
->
pTscObj
->
mutex
);
STscObj
*
pTscObj
=
pSql
->
pTscObj
;
switch
(
pTscObj
->
from
)
{
#ifdef HTTP_EMBEDDED
case
TAOS_REQ_FROM_HTTP
:
pCtx
=
pSql
->
param
;
if
(
pCtx
&&
pCtx
->
db
[
0
]
!=
'\0'
)
{
...
...
@@ -5212,6 +5218,7 @@ char* cloneCurrentDBName(SSqlObj* pSql) {
p
=
strdup
(
db
);
}
break
;
#endif
default:
break
;
}
...
...
grafanaplugin
@
016d8e82
比较
4a4d7909
...
016d8e82
Subproject commit
4a4d79099b076b8ff12d5b4fdbcba54049a6866d
Subproject commit
016d8e82a24d72779be0ab0090580a372b4fffca
src/dnode/CMakeLists.txt
浏览文件 @
1ec52a7d
...
...
@@ -18,7 +18,12 @@ ELSE ()
ENDIF
()
ADD_EXECUTABLE
(
taosd
${
SRC
}
)
IF
(
TD_BUILD_HTTP
)
TARGET_LINK_LIBRARIES
(
taosd mnode monitor http tsdb twal vnode cJson lua lz4 balance sync
${
LINK_JEMALLOC
}
)
ELSE
()
TARGET_LINK_LIBRARIES
(
taosd mnode monitor tsdb twal vnode cJson lua lz4 balance sync
${
LINK_JEMALLOC
}
)
ENDIF
()
IF
(
TD_SOMODE_STATIC
)
TARGET_LINK_LIBRARIES
(
taosd taos_static
)
...
...
src/dnode/src/dnodeModule.c
浏览文件 @
1ec52a7d
...
...
@@ -49,6 +49,7 @@ static void dnodeAllocModules() {
tsModule
[
TSDB_MOD_MNODE
].
startFp
=
mnodeStartSystem
;
tsModule
[
TSDB_MOD_MNODE
].
stopFp
=
mnodeStopSystem
;
#ifdef HTTP_EMBEDDED
tsModule
[
TSDB_MOD_HTTP
].
enable
=
(
tsEnableHttpModule
==
1
);
tsModule
[
TSDB_MOD_HTTP
].
name
=
"http"
;
tsModule
[
TSDB_MOD_HTTP
].
initFp
=
httpInitSystem
;
...
...
@@ -58,6 +59,7 @@ static void dnodeAllocModules() {
if
(
tsEnableHttpModule
)
{
dnodeSetModuleStatus
(
TSDB_MOD_HTTP
);
}
#endif
#ifdef _MQTT
tsModule
[
TSDB_MOD_MQTT
].
enable
=
(
tsEnableMqttModule
==
1
);
...
...
src/dnode/src/dnodeShell.c
浏览文件 @
1ec52a7d
...
...
@@ -240,7 +240,9 @@ void *dnodeSendCfgTableToRecv(int32_t vgId, int32_t tid) {
SStatisInfo
dnodeGetStatisInfo
()
{
SStatisInfo
info
=
{
0
};
if
(
dnodeGetRunStatus
()
==
TSDB_RUN_STATUS_RUNING
)
{
#ifdef HTTP_EMBEDDED
info
.
httpReqNum
=
httpGetReqCount
();
#endif
info
.
queryReqNum
=
atomic_exchange_32
(
&
tsQueryReqNum
,
0
);
info
.
submitReqNum
=
atomic_exchange_32
(
&
tsSubmitReqNum
,
0
);
}
...
...
src/kit/taosdemo/taosdemo.c
浏览文件 @
1ec52a7d
...
...
@@ -586,6 +586,7 @@ static int64_t getTSRandTail(int64_t timeStampStep, int32_t seq,
int
disorderRatio
,
int
disorderRange
);
static
bool
getInfoFromJsonFile
(
char
*
file
);
static
void
init_rand_data
();
static
int
regexMatch
(
const
char
*
s
,
const
char
*
reg
,
int
cflags
);
/* ************ Global variables ************ */
...
...
@@ -803,7 +804,7 @@ static void printHelp() {
printf
(
"%s%s%s%s
\n
"
,
indent
,
"-q, --query-mode=MODE"
,
"
\t\t
"
,
"Query mode -- 0: SYNC, 1: ASYNC. By default use SYNC."
);
printf
(
"%s%s%s%s
\n
"
,
indent
,
"-b, --data-type=DATATYPE"
,
"
\t
"
,
"The data_type of columns, By default use: FLOAT,
INT, FLOAT.
"
);
"The data_type of columns, By default use: FLOAT,
INT,FLOAT. NCHAR and BINARY can also use custom length. Eg: NCHAR(16),BINARY(8)
"
);
printf
(
"%s%s%s%s%d
\n
"
,
indent
,
"-w, --binwidth=WIDTH"
,
"
\t\t
"
,
"The width of data_type 'BINARY' or 'NCHAR'. By default use "
,
g_args
.
binwidth
);
...
...
@@ -1579,9 +1580,8 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
&&
strcasecmp
(
dataType
,
"SMALLINT"
)
&&
strcasecmp
(
dataType
,
"BIGINT"
)
&&
strcasecmp
(
dataType
,
"DOUBLE"
)
&&
strcasecmp
(
dataType
,
"BINARY"
)
&&
strcasecmp
(
dataType
,
"TIMESTAMP"
)
&&
strcasecmp
(
dataType
,
"NCHAR"
)
&&
!
regexMatch
(
dataType
,
"^(NCHAR|BINARY)(
\\
([1-9][0-9]*
\\
))?$"
,
REG_ICASE
|
REG_EXTENDED
)
&&
strcasecmp
(
dataType
,
"UTINYINT"
)
&&
strcasecmp
(
dataType
,
"USMALLINT"
)
&&
strcasecmp
(
dataType
,
"UINT"
)
...
...
@@ -1603,9 +1603,11 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
arguments
->
data_type
[
0
]
=
TSDB_DATA_TYPE_FLOAT
;
}
else
if
(
0
==
strcasecmp
(
dataType
,
"DOUBLE"
))
{
arguments
->
data_type
[
0
]
=
TSDB_DATA_TYPE_DOUBLE
;
}
else
if
(
0
==
strcasecmp
(
dataType
,
"BINARY"
))
{
}
else
if
(
1
==
regexMatch
(
dataType
,
"^BINARY(
\\
([1-9][0-9]*
\\
))?$"
,
REG_ICASE
|
REG_EXTENDED
))
{
arguments
->
data_type
[
0
]
=
TSDB_DATA_TYPE_BINARY
;
}
else
if
(
0
==
strcasecmp
(
dataType
,
"NCHAR"
))
{
}
else
if
(
1
==
regexMatch
(
dataType
,
"^NCHAR(
\\
([1-9][0-9]*
\\
))?$"
,
REG_ICASE
|
REG_EXTENDED
))
{
arguments
->
data_type
[
0
]
=
TSDB_DATA_TYPE_NCHAR
;
}
else
if
(
0
==
strcasecmp
(
dataType
,
"BOOL"
))
{
arguments
->
data_type
[
0
]
=
TSDB_DATA_TYPE_BOOL
;
...
...
@@ -1638,9 +1640,8 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
&&
strcasecmp
(
token
,
"SMALLINT"
)
&&
strcasecmp
(
token
,
"BIGINT"
)
&&
strcasecmp
(
token
,
"DOUBLE"
)
&&
strcasecmp
(
token
,
"BINARY"
)
&&
strcasecmp
(
token
,
"TIMESTAMP"
)
&&
strcasecmp
(
token
,
"NCHAR"
)
&&
!
regexMatch
(
token
,
"^(NCHAR|BINARY)(
\\
([1-9][0-9]*
\\
))?$"
,
REG_ICASE
|
REG_EXTENDED
)
&&
strcasecmp
(
token
,
"UTINYINT"
)
&&
strcasecmp
(
token
,
"USMALLINT"
)
&&
strcasecmp
(
token
,
"UINT"
)
...
...
@@ -1663,9 +1664,11 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
arguments
->
data_type
[
index
]
=
TSDB_DATA_TYPE_DOUBLE
;
}
else
if
(
0
==
strcasecmp
(
token
,
"TINYINT"
))
{
arguments
->
data_type
[
index
]
=
TSDB_DATA_TYPE_TINYINT
;
}
else
if
(
0
==
strcasecmp
(
token
,
"BINARY"
))
{
}
else
if
(
1
==
regexMatch
(
token
,
"^BINARY(
\\
([1-9][0-9]*
\\
))?$"
,
REG_ICASE
|
REG_EXTENDED
))
{
arguments
->
data_type
[
index
]
=
TSDB_DATA_TYPE_BINARY
;
}
else
if
(
0
==
strcasecmp
(
token
,
"NCHAR"
))
{
}
else
if
(
1
==
regexMatch
(
token
,
"^NCHAR(
\\
([1-9][0-9]*
\\
))?$"
,
REG_ICASE
|
REG_EXTENDED
))
{
arguments
->
data_type
[
index
]
=
TSDB_DATA_TYPE_NCHAR
;
}
else
if
(
0
==
strcasecmp
(
token
,
"BOOL"
))
{
arguments
->
data_type
[
index
]
=
TSDB_DATA_TYPE_BOOL
;
...
...
@@ -2660,117 +2663,127 @@ static int printfInsertMeta() {
}
}
printf
(
" super table count:
\033
[33m%"
PRIu64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTblCount
);
for
(
uint64_t
j
=
0
;
j
<
g_Dbs
.
db
[
i
].
superTblCount
;
j
++
)
{
printf
(
" super table[
\033
[33m%"
PRIu64
"
\033
[0m]:
\n
"
,
j
);
printf
(
" stbName:
\033
[33m%s
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
stbName
);
if
(
PRE_CREATE_SUBTBL
==
g_Dbs
.
db
[
i
].
superTbls
[
j
].
autoCreateTable
)
{
printf
(
" autoCreateTable:
\033
[33m%s
\033
[0m
\n
"
,
"no"
);
}
else
if
(
AUTO_CREATE_SUBTBL
==
g_Dbs
.
db
[
i
].
superTbls
[
j
].
autoCreateTable
)
{
printf
(
" autoCreateTable:
\033
[33m%s
\033
[0m
\n
"
,
"yes"
);
}
else
{
printf
(
" autoCreateTable:
\033
[33m%s
\033
[0m
\n
"
,
"error"
);
}
if
(
TBL_NO_EXISTS
==
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblExists
)
{
printf
(
" childTblExists:
\033
[33m%s
\033
[0m
\n
"
,
"no"
);
}
else
if
(
TBL_ALREADY_EXISTS
==
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblExists
)
{
printf
(
" childTblExists:
\033
[33m%s
\033
[0m
\n
"
,
"yes"
);
}
else
{
printf
(
" childTblExists:
\033
[33m%s
\033
[0m
\n
"
,
"error"
);
}
printf
(
" childTblCount:
\033
[33m%"
PRId64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblCount
);
printf
(
" childTblPrefix:
\033
[33m%s
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblPrefix
);
printf
(
" dataSource:
\033
[33m%s
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
dataSource
);
printf
(
" iface:
\033
[33m%s
\033
[0m
\n
"
,
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
iface
==
TAOSC_IFACE
)
?
"taosc"
:
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
iface
==
REST_IFACE
)
?
"rest"
:
"stmt"
);
if
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblLimit
>
0
)
{
printf
(
" childTblLimit:
\033
[33m%"
PRId64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblLimit
);
}
if
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblOffset
>
0
)
{
printf
(
" childTblOffset:
\033
[33m%"
PRIu64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblOffset
);
}
printf
(
" insertRows:
\033
[33m%"
PRId64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
insertRows
);
/*
if (0 == g_Dbs.db[i].superTbls[j].multiThreadWriteOneTbl) {
printf(" multiThreadWriteOneTbl: \033[33m no\033[0m\n");
}else {
printf(" multiThreadWriteOneTbl: \033[33m yes\033[0m\n");
}
*/
printf
(
" interlaceRows:
\033
[33m%u
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
interlaceRows
);
if
(
g_args
.
use_metric
)
{
printf
(
" super table count:
\033
[33m%"
PRIu64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTblCount
);
for
(
uint64_t
j
=
0
;
j
<
g_Dbs
.
db
[
i
].
superTblCount
;
j
++
)
{
printf
(
" super table[
\033
[33m%"
PRIu64
"
\033
[0m]:
\n
"
,
j
);
if
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
interlaceRows
>
0
)
{
printf
(
" stable insert interval:
\033
[33m%"
PRIu64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
insertInterval
);
}
printf
(
" stbName:
\033
[33m%s
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
stbName
);
printf
(
" disorderRange:
\033
[33m%d
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
disorderRange
);
printf
(
" disorderRatio:
\033
[33m%d
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
disorderRatio
);
printf
(
" maxSqlLen:
\033
[33m%"
PRIu64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
maxSqlLen
);
printf
(
" timeStampStep:
\033
[33m%"
PRId64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
timeStampStep
);
printf
(
" startTimestamp:
\033
[33m%s
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
startTimestamp
);
printf
(
" sampleFormat:
\033
[33m%s
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
sampleFormat
);
printf
(
" sampleFile:
\033
[33m%s
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
sampleFile
);
printf
(
" tagsFile:
\033
[33m%s
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
tagsFile
);
printf
(
" columnCount:
\033
[33m%d
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
columnCount
);
for
(
int
k
=
0
;
k
<
g_Dbs
.
db
[
i
].
superTbls
[
j
].
columnCount
;
k
++
)
{
//printf("dataType:%s, dataLen:%d\t", g_Dbs.db[i].superTbls[j].columns[k].dataType, g_Dbs.db[i].superTbls[j].columns[k].dataLen);
if
((
0
==
strncasecmp
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
columns
[
k
].
dataType
,
"binary"
,
6
))
||
(
0
==
strncasecmp
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
columns
[
k
].
dataType
,
"nchar"
,
5
)))
{
printf
(
"column[
\033
[33m%d
\033
[0m]:
\033
[33m%s(%d)
\033
[0m "
,
k
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
columns
[
k
].
dataType
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
columns
[
k
].
dataLen
);
if
(
PRE_CREATE_SUBTBL
==
g_Dbs
.
db
[
i
].
superTbls
[
j
].
autoCreateTable
)
{
printf
(
" autoCreateTable:
\033
[33m%s
\033
[0m
\n
"
,
"no"
);
}
else
if
(
AUTO_CREATE_SUBTBL
==
g_Dbs
.
db
[
i
].
superTbls
[
j
].
autoCreateTable
)
{
printf
(
" autoCreateTable:
\033
[33m%s
\033
[0m
\n
"
,
"yes"
);
}
else
{
printf
(
"column[%d]:
\033
[33m%s
\033
[0m "
,
k
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
columns
[
k
].
dataType
);
printf
(
" autoCreateTable:
\033
[33m%s
\033
[0m
\n
"
,
"error"
);
}
}
printf
(
"
\n
"
);
printf
(
" tagCount:
\033
[33m%d
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
tagCount
);
for
(
int
k
=
0
;
k
<
g_Dbs
.
db
[
i
].
superTbls
[
j
].
tagCount
;
k
++
)
{
//printf("dataType:%s, dataLen:%d\t", g_Dbs.db[i].superTbls[j].tags[k].dataType, g_Dbs.db[i].superTbls[j].tags[k].dataLen);
if
((
0
==
strncasecmp
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
tags
[
k
].
dataType
,
"binary"
,
strlen
(
"binary"
)))
||
(
0
==
strncasecmp
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
tags
[
k
].
dataType
,
"nchar"
,
strlen
(
"nchar"
))))
{
printf
(
"tag[%d]:
\033
[33m%s(%d)
\033
[0m "
,
k
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
tags
[
k
].
dataType
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
tags
[
k
].
dataLen
);
if
(
TBL_NO_EXISTS
==
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblExists
)
{
printf
(
" childTblExists:
\033
[33m%s
\033
[0m
\n
"
,
"no"
);
}
else
if
(
TBL_ALREADY_EXISTS
==
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblExists
)
{
printf
(
" childTblExists:
\033
[33m%s
\033
[0m
\n
"
,
"yes"
);
}
else
{
printf
(
"tag[%d]:
\033
[33m%s
\033
[0m "
,
k
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
tags
[
k
].
dataType
);
printf
(
" childTblExists:
\033
[33m%s
\033
[0m
\n
"
,
"error"
);
}
printf
(
" childTblCount:
\033
[33m%"
PRId64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblCount
);
printf
(
" childTblPrefix:
\033
[33m%s
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblPrefix
);
printf
(
" dataSource:
\033
[33m%s
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
dataSource
);
printf
(
" iface:
\033
[33m%s
\033
[0m
\n
"
,
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
iface
==
TAOSC_IFACE
)
?
"taosc"
:
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
iface
==
REST_IFACE
)
?
"rest"
:
"stmt"
);
if
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblLimit
>
0
)
{
printf
(
" childTblLimit:
\033
[33m%"
PRId64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblLimit
);
}
if
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblOffset
>
0
)
{
printf
(
" childTblOffset:
\033
[33m%"
PRIu64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblOffset
);
}
printf
(
" insertRows:
\033
[33m%"
PRId64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
insertRows
);
/*
if (0 == g_Dbs.db[i].superTbls[j].multiThreadWriteOneTbl) {
printf(" multiThreadWriteOneTbl: \033[33m no\033[0m\n");
}else {
printf(" multiThreadWriteOneTbl: \033[33m yes\033[0m\n");
}
*/
printf
(
" interlaceRows:
\033
[33m%u
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
interlaceRows
);
if
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
interlaceRows
>
0
)
{
printf
(
" stable insert interval:
\033
[33m%"
PRIu64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
insertInterval
);
}
printf
(
" disorderRange:
\033
[33m%d
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
disorderRange
);
printf
(
" disorderRatio:
\033
[33m%d
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
disorderRatio
);
printf
(
" maxSqlLen:
\033
[33m%"
PRIu64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
maxSqlLen
);
printf
(
" timeStampStep:
\033
[33m%"
PRId64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
timeStampStep
);
printf
(
" startTimestamp:
\033
[33m%s
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
startTimestamp
);
printf
(
" sampleFormat:
\033
[33m%s
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
sampleFormat
);
printf
(
" sampleFile:
\033
[33m%s
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
sampleFile
);
printf
(
" tagsFile:
\033
[33m%s
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
tagsFile
);
printf
(
" columnCount:
\033
[33m%d
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
columnCount
);
for
(
int
k
=
0
;
k
<
g_Dbs
.
db
[
i
].
superTbls
[
j
].
columnCount
;
k
++
)
{
//printf("dataType:%s, dataLen:%d\t", g_Dbs.db[i].superTbls[j].columns[k].dataType, g_Dbs.db[i].superTbls[j].columns[k].dataLen);
if
((
0
==
strncasecmp
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
columns
[
k
].
dataType
,
"binary"
,
6
))
||
(
0
==
strncasecmp
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
columns
[
k
].
dataType
,
"nchar"
,
5
)))
{
printf
(
"column[%d]:
\033
[33m%s(%d)
\033
[0m "
,
k
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
columns
[
k
].
dataType
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
columns
[
k
].
dataLen
);
}
else
{
printf
(
"column[%d]:
\033
[33m%s
\033
[0m "
,
k
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
columns
[
k
].
dataType
);
}
}
printf
(
"
\n
"
);
printf
(
" tagCount:
\033
[33m%d
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
tagCount
);
for
(
int
k
=
0
;
k
<
g_Dbs
.
db
[
i
].
superTbls
[
j
].
tagCount
;
k
++
)
{
//printf("dataType:%s, dataLen:%d\t", g_Dbs.db[i].superTbls[j].tags[k].dataType, g_Dbs.db[i].superTbls[j].tags[k].dataLen);
if
((
0
==
strncasecmp
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
tags
[
k
].
dataType
,
"binary"
,
strlen
(
"binary"
)))
||
(
0
==
strncasecmp
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
tags
[
k
].
dataType
,
"nchar"
,
strlen
(
"nchar"
))))
{
printf
(
"tag[%d]:
\033
[33m%s(%d)
\033
[0m "
,
k
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
tags
[
k
].
dataType
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
tags
[
k
].
dataLen
);
}
else
{
printf
(
"tag[%d]:
\033
[33m%s
\033
[0m "
,
k
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
tags
[
k
].
dataType
);
}
}
printf
(
"
\n
"
);
}
printf
(
"
\n
"
);
}
else
{
printf
(
" childTblCount:
\033
[33m%"
PRId64
"
\033
[0m
\n
"
,
g_args
.
ntables
);
printf
(
" insertRows:
\033
[33m%"
PRId64
"
\033
[0m
\n
"
,
g_args
.
insertRows
);
}
printf
(
"
\n
"
);
}
...
...
@@ -10286,8 +10299,7 @@ static void startMultiThreadInsertData(int threads, char* db_name,
b
=
ntables
%
threads
;
}
if
((
stbInfo
)
&&
(
stbInfo
->
iface
==
REST_IFACE
))
{
if
(
g_args
.
iface
==
REST_IFACE
||
((
stbInfo
)
&&
(
stbInfo
->
iface
==
REST_IFACE
)))
{
if
(
convertHostToServAddr
(
g_Dbs
.
host
,
g_Dbs
.
port
,
&
(
g_Dbs
.
serv_addr
))
!=
0
)
{
ERROR_EXIT
(
"convert host to server address"
);
...
...
@@ -11738,6 +11750,8 @@ static void initOfQueryMeta() {
}
static
void
setParaFromArg
()
{
char
type
[
20
];
char
length
[
20
];
if
(
g_args
.
host
)
{
tstrncpy
(
g_Dbs
.
host
,
g_args
.
host
,
MAX_HOSTNAME_SIZE
);
}
else
{
...
...
@@ -11819,7 +11833,17 @@ static void setParaFromArg() {
g_Dbs
.
db
[
0
].
superTbls
[
0
].
columns
[
i
].
data_type
=
data_type
[
i
];
tstrncpy
(
g_Dbs
.
db
[
0
].
superTbls
[
0
].
columns
[
i
].
dataType
,
dataType
[
i
],
min
(
DATATYPE_BUFF_LEN
,
strlen
(
dataType
[
i
])
+
1
));
g_Dbs
.
db
[
0
].
superTbls
[
0
].
columns
[
i
].
dataLen
=
g_args
.
binwidth
;
if
(
1
==
regexMatch
(
dataType
[
i
],
"^(NCHAR|BINARY)(
\\
([1-9][0-9]*
\\
))$"
,
REG_ICASE
|
REG_EXTENDED
))
{
sscanf
(
dataType
[
i
],
"%[^(](%[^)]"
,
type
,
length
);
g_Dbs
.
db
[
0
].
superTbls
[
0
].
columns
[
i
].
dataLen
=
atoi
(
length
);
tstrncpy
(
g_Dbs
.
db
[
0
].
superTbls
[
0
].
columns
[
i
].
dataType
,
type
,
min
(
DATATYPE_BUFF_LEN
,
strlen
(
type
)
+
1
));
}
else
{
g_Dbs
.
db
[
0
].
superTbls
[
0
].
columns
[
i
].
dataLen
=
g_args
.
binwidth
;
tstrncpy
(
g_Dbs
.
db
[
0
].
superTbls
[
0
].
columns
[
i
].
dataType
,
dataType
[
i
],
min
(
DATATYPE_BUFF_LEN
,
strlen
(
dataType
[
i
])
+
1
));
}
g_Dbs
.
db
[
0
].
superTbls
[
0
].
columnCount
++
;
}
...
...
src/kit/taosdump/taosdump.c
浏览文件 @
1ec52a7d
此差异已折叠。
点击以展开。
src/plugins/CMakeLists.txt
浏览文件 @
1ec52a7d
...
...
@@ -2,7 +2,11 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8...3.20)
PROJECT
(
TDengine
)
ADD_SUBDIRECTORY
(
monitor
)
ADD_SUBDIRECTORY
(
http
)
IF
(
TD_BUILD_HTTP
)
ADD_SUBDIRECTORY
(
http
)
ENDIF
()
IF
(
TD_LINUX AND TD_MQTT
)
ADD_SUBDIRECTORY
(
mqtt
)
ENDIF
()
\ No newline at end of file
ENDIF
()
tests/examples/c/makefile
浏览文件 @
1ec52a7d
...
...
@@ -7,8 +7,7 @@ LFLAGS = '-Wl,-rpath,/usr/local/taos/driver/' -ltaos -lpthread -lm -lrt
CFLAGS
=
-O3
-g
-Wall
-Wno-deprecated
-fPIC
-Wno-unused-result
-Wconversion
\
-Wno-char-subscripts
-D_REENTRANT
-Wno-format
-D_REENTRANT
-DLINUX
\
-Wno-unused-function
-D_M_X64
-I
/usr/local/taos/include
-std
=
gnu99
\
-I
../../../src/os/inc
-I
../../../src/inc
\
-I
../../../src/util/inc
-I
../../../src/common/inc
-I
../../../deps/cJson/inc
all
:
$(TARGET)
exe
:
...
...
@@ -18,12 +17,6 @@ exe:
gcc
$(CFLAGS)
./stream.c
-o
$(ROOT)
stream
$(LFLAGS)
gcc
$(CFLAGS)
./subscribe.c
-o
$(ROOT)
subscribe
$(LFLAGS)
gcc
$(CFLAGS)
./apitest.c
-o
$(ROOT)
apitest
$(LFLAGS)
gcc
$(CFLAGS)
./clientcfgtest.c
-o
$(ROOT)
clientcfgtest
$(LFLAGS)
gcc
$(CFLAGS)
./clientcfgtest-wrongtype.c
-o
$(ROOT)
clientcfgtest-wrongtype
$(LFLAGS)
gcc
$(CFLAGS)
./clientcfgtest-wrongjson.c
-o
$(ROOT)
clientcfgtest-wrongjson
$(LFLAGS)
gcc
$(CFLAGS)
./clientcfgtest-wrongvalue.c
-o
$(ROOT)
clientcfgtest-wrongvalue
$(LFLAGS)
gcc
$(CFLAGS)
./clientcfgtest-taosd.c
-o
$(ROOT)
clientcfgtest-taosd
$(LFLAGS)
clean
:
rm
$(ROOT)
asyncdemo
...
...
@@ -33,9 +26,7 @@ clean:
rm
$(ROOT)
stream
rm
$(ROOT)
subscribe
rm
$(ROOT)
apitest
rm
$(ROOT)
clientcfgtest
rm
$(ROOT)
clientcfgtest-wrongtype
rm
$(ROOT)
clientcfgtest-wrongjson
rm
$(ROOT)
clientcfgtest-wrongvalue
rm
$(ROOT)
clientcfgtest-taosd
tests/gotest/batchtest.bat
浏览文件 @
1ec52a7d
...
...
@@ -9,7 +9,7 @@ if "%severIp%"=="" (set severIp=127.0.0.1)
if
"
%serverPort%
"
==
""
(
set
serverPort
=
6030
)
go
env
-w
GO111MODULE
=
on
go
env
-w
GOPROXY
=
https
://goproxy.
io
,
direct
go
env
-w
GOPROXY
=
https
://goproxy.
cn
,
direct
cd
case001
case001
.bat
%severIp%
%serverPort%
...
...
@@ -25,4 +25,4 @@ rem cd nanosupport
rem nanoCase.bat
:: cd nanosupport
:: nanoCase.bat
\ No newline at end of file
:: nanoCase.bat
tests/gotest/batchtest.sh
浏览文件 @
1ec52a7d
...
...
@@ -14,7 +14,7 @@ if [ ! -n "$serverPort" ]; then
fi
go
env
-w
GO111MODULE
=
on
go
env
-w
GOPROXY
=
https://goproxy.
io
,direct
go
env
-w
GOPROXY
=
https://goproxy.
cn
,direct
bash ./case001/case001.sh
$severIp
$serverPort
bash ./case002/case002.sh
$severIp
$serverPort
...
...
tests/pytest/fulltest.sh
浏览文件 @
1ec52a7d
...
...
@@ -398,6 +398,7 @@ python3 ./test.py -f query/queryWildcardLength.py
python3 ./test.py
-f
query/queryTbnameUpperLower.py
python3 ./test.py
-f
query/query.py
python3 ./test.py
-f
query/queryDiffColsOr.py
python3 ./test.py
-f
query/queryRegex.py
#======================p4-end===============
...
...
tests/pytest/query/queryGroupbyWithInterval.py
浏览文件 @
1ec52a7d
...
...
@@ -41,6 +41,14 @@ class TDTestCase:
tdSql
.
execute
(
"insert into test22 using stest tags('test21','ccc') values ('2020-09-04 16:54:54.003',210,3)"
)
#2021-09-17 For jira: https://jira.taosdata.com:18080/browse/TD-6085
tdSql
.
query
(
"select last(size),appname from stest where tbname in ('test1','test2','test11')"
)
tdSql
.
checkRows
(
1
)
#2021-09-17 For jira: https://jira.taosdata.com:18080/browse/TD-6314
tdSql
.
query
(
"select _block_dist() from stest"
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"select sum(size) from stest interval(1d) group by appname"
)
tdSql
.
checkRows
(
3
)
...
...
tests/pytest/query/queryRegex.py
0 → 100644
浏览文件 @
1ec52a7d
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import
sys
import
taos
from
util.log
import
tdLog
from
util.cases
import
tdCases
from
util.sql
import
tdSql
from
util.dnodes
import
tdDnodes
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
print
(
"==============step1"
)
##2021-09-17 For jira: https://jira.taosdata.com:18080/browse/TD-6585
tdSql
.
execute
(
"create stable if not exists stb_test(ts timestamp,c0 binary(32)) tags(t0 binary(32))"
)
tdSql
.
execute
(
'create table if not exists stb_1 using stb_test tags("abcdefgasdfg12346")'
)
tdLog
.
info
(
'insert into stb_1 values("2021-09-13 10:00:00.001","abcefdasdqwerxasdazx12345"'
)
tdSql
.
execute
(
'insert into stb_1 values("2021-09-13 10:00:00.001","abcefdasdqwerxasdazx12345")'
)
tdSql
.
query
(
'select * from stb_test where tbname match "asd"'
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
'select * from stb_test where tbname nmatch "asd"'
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
'select * from stb_test where c0 match "abc"'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
1
,
"abcefdasdqwerxasdazx12345"
)
tdSql
.
query
(
'select * from stb_test where c0 nmatch "abc"'
)
tdSql
.
checkRows
(
0
)
tdSql
.
error
(
'select * from stb_test where c0 match abc'
)
tdSql
.
error
(
'select * from stb_test where c0 nmatch abc'
)
tdSql
.
execute
(
'insert into stb_1 values("2020-10-13 10:00:00.001","abcd
\\
\efgh")'
)
tdSql
.
query
(
"select * from stb_1 where c0 match '
\\\\
'"
)
tdSql
.
checkRows
(
1
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/script/api/clientcfgtest.c
0 → 100644
浏览文件 @
1ec52a7d
// The test case to verfy TS-293
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <taos.h>
#include "os.h"
#include "taosdef.h"
#include "taoserror.h"
#include "tconfig.h"
#include "tglobal.h"
#include "tulog.h"
#include "tsocket.h"
#include "tutil.h"
extern
SGlobalCfg
*
taosGetConfigOption
(
const
char
*
option
)
;
int
main
(
int
argc
,
char
*
argv
[]){
printf
(
"start to test
\n
"
);
//case1:
//Test config firstEp success
const
char
config1
[
128
]
=
"{
\"
firstEp
\"
:
\"
BCC-2:6030
\"
,
\"
debugFlag
\"
:
\"
135
\"
}"
;
//input the parameter which want to be configured
taos_set_config
(
config1
);
//configure the parameter
SGlobalCfg
*
cfg
;
cfg
=
taosGetConfigOption
(
"firstEp"
);
//check the option result
if
(
cfg
->
cfgStatus
!=
3
){
//If cfgStatus is 3,it means configure is success
printf
(
"config firstEp 'BCC-2:6030'failures!
\n
"
);
exit
(
1
);
}
cfg
=
taosGetConfigOption
(
"debugFlag"
);
//check the option result
if
(
cfg
->
cfgStatus
!=
3
){
printf
(
"config debugFlag '135' failures!
\n
"
);
exit
(
1
);
}
//case2:
//Test config only useful at the first time
//The result is failure
const
char
config2
[
128
]
=
"{
\"
fqdn
\"
:
\"
BCC-3
\"
}"
;
taos_set_config
(
config2
);
//configure the parameter
cfg
=
taosGetConfigOption
(
"fqdn"
);
//check the option result
if
(
cfg
->
cfgStatus
==
3
){
printf
(
"config firstEp to 'BCC-3' failures!
\n
"
);
exit
(
1
);
}
else
{
printf
(
"test case success!
\n
"
);
exit
(
0
);
}
return
0
;
}
tests/script/api/makefile
浏览文件 @
1ec52a7d
...
...
@@ -7,7 +7,10 @@ LFLAGS = '-Wl,-rpath,/usr/local/taos/driver/' -ltaos -lpthread -lm -lrt
CFLAGS
=
-O0
-g
-Wall
-Wno-deprecated
-fPIC
-Wno-unused-result
-Wconversion
\
-Wno-char-subscripts
-D_REENTRANT
-Wno-format
-D_REENTRANT
-DLINUX
\
-Wno-unused-function
-D_M_X64
-I
/usr/local/taos/include
-std
=
gnu99
\
-fsanitize
=
address
-I
../../../deps/cJson/inc
-I
../../../deps/cJson/inc
\
-I
../../../src/os/inc/
-I
../../../src/inc
-I
../../../src/util/inc
\
-I
../../../src/common/inc
-I
../../../deps/cJson/inc
all
:
$(TARGET)
...
...
@@ -16,11 +19,19 @@ exe:
gcc
$(CFLAGS)
./stmtBatchTest.c
-o
$(ROOT)
stmtBatchTest
$(LFLAGS)
gcc
$(CFLAGS)
./stmtTest.c
-o
$(ROOT)
stmtTest
$(LFLAGS)
gcc
$(CFLAGS)
./stmt_function.c
-o
$(ROOT)
stmt_function
$(LFLAGS)
gcc
$(CFLAGS)
./clientcfgtest.c
-o
$(ROOT)clientcfgtest
$(LFLAGS)
gcc
$(CFLAGS)
./openTSDBTest.c
-o
$(ROOT)openTSDBTest
$(LFLAGS)
clean
:
rm
$(ROOT)
batchprepare
rm
$(ROOT)
stmtBatchTest
rm
$(ROOT)
stmtTest
rm
$(ROOT)
stmt_function
rm
$(ROOT)clientcfgtest
rm
$(ROOT)openTSDBTest
tests/test-all.sh
浏览文件 @
1ec52a7d
...
...
@@ -233,6 +233,7 @@ totalPyFailed=0
totalJDBCFailed
=
0
totalUnitFailed
=
0
totalExampleFailed
=
0
totalApiFailed
=
0
if
[
"
${
OS
}
"
==
"Linux"
]
;
then
corepath
=
`
grep
-oP
'.*(?=core_)'
/proc/sys/kernel/core_pattern||grep
-oP
'.*(?=core-)'
/proc/sys/kernel/core_pattern
`
...
...
@@ -532,7 +533,28 @@ if [ "$2" != "sim" ] && [ "$2" != "python" ] && [ "$2" != "jdbc" ] && [ "$2" !=
echo
"demo pass"
totalExamplePass
=
`
expr
$totalExamplePass
+ 1
`
fi
echo
"### run setconfig tests ###"
stopTaosd
cd
$tests_dir
echo
"current dir: "
pwd
cd
script/api
echo
"building setcfgtest"
make
>
/dev/null
./clientcfgtest
if
[
$?
!=
"0"
]
;
then
echo
"clientcfgtest failed"
totalExampleFailed
=
`
expr
$totalExampleFailed
+ 1
`
else
echo
"clientcfgtest pass"
totalExamplePass
=
`
expr
$totalExamplePass
+ 1
`
fi
if
[
"
$totalExamplePass
"
-gt
"0"
]
;
then
echo
-e
"
\n
${
GREEN
}
### Total
$totalExamplePass
examples succeed! ###
${
NC
}
"
fi
...
...
@@ -544,7 +566,13 @@ if [ "$2" != "sim" ] && [ "$2" != "python" ] && [ "$2" != "jdbc" ] && [ "$2" !=
if
[
"
${
OS
}
"
==
"Linux"
]
;
then
dohavecore 1
fi
fi
exit
$((
$totalFailed
+
$totalPyFailed
+
$totalJDBCFailed
+
$totalUnitFailed
+
$totalExampleFailed
))
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录