Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
62d4dc8d
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看板
未验证
提交
62d4dc8d
编写于
9月 26, 2021
作者:
J
Jason-Jia
提交者:
GitHub
9月 26, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into jiacy-0924
上级
9a028e5c
be4b3d11
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
193 addition
and
15 deletion
+193
-15
src/connector/grafanaplugin
src/connector/grafanaplugin
+1
-1
tests/examples/c/makefile
tests/examples/c/makefile
+4
-13
tests/pytest/fulltest.sh
tests/pytest/fulltest.sh
+4
-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
未找到文件。
grafanaplugin
@
016d8e82
比较
4a4d7909
...
016d8e82
Subproject commit
4a4d79099b076b8ff12d5b4fdbcba54049a6866d
Subproject commit
016d8e82a24d72779be0ab0090580a372b4fffca
tests/examples/c/makefile
浏览文件 @
62d4dc8d
...
@@ -7,8 +7,7 @@ LFLAGS = '-Wl,-rpath,/usr/local/taos/driver/' -ltaos -lpthread -lm -lrt
...
@@ -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
\
CFLAGS
=
-O3
-g
-Wall
-Wno-deprecated
-fPIC
-Wno-unused-result
-Wconversion
\
-Wno-char-subscripts
-D_REENTRANT
-Wno-format
-D_REENTRANT
-DLINUX
\
-Wno-char-subscripts
-D_REENTRANT
-Wno-format
-D_REENTRANT
-DLINUX
\
-Wno-unused-function
-D_M_X64
-I
/usr/local/taos/include
-std
=
gnu99
\
-Wno-unused-function
-D_M_X64
-I
/usr/local/taos/include
-std
=
gnu99
\
-I
../../../src/os/inc
-I
../../../src/inc
\
-I
../../../deps/cJson/inc
-I
../../../src/util/inc
-I
../../../src/common/inc
all
:
$(TARGET)
all
:
$(TARGET)
exe
:
exe
:
...
@@ -18,12 +17,6 @@ exe:
...
@@ -18,12 +17,6 @@ exe:
gcc
$(CFLAGS)
./stream.c
-o
$(ROOT)
stream
$(LFLAGS)
gcc
$(CFLAGS)
./stream.c
-o
$(ROOT)
stream
$(LFLAGS)
gcc
$(CFLAGS)
./subscribe.c
-o
$(ROOT)
subscribe
$(LFLAGS)
gcc
$(CFLAGS)
./subscribe.c
-o
$(ROOT)
subscribe
$(LFLAGS)
gcc
$(CFLAGS)
./apitest.c
-o
$(ROOT)
apitest
$(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
:
clean
:
rm
$(ROOT)
asyncdemo
rm
$(ROOT)
asyncdemo
...
@@ -33,9 +26,7 @@ clean:
...
@@ -33,9 +26,7 @@ clean:
rm
$(ROOT)
stream
rm
$(ROOT)
stream
rm
$(ROOT)
subscribe
rm
$(ROOT)
subscribe
rm
$(ROOT)
apitest
rm
$(ROOT)
apitest
rm
$(ROOT)
clientcfgtest
rm
$(ROOT)
clientcfgtest-wrongtype
rm
$(ROOT)
clientcfgtest-wrongjson
rm
$(ROOT)
clientcfgtest-wrongvalue
rm
$(ROOT)
clientcfgtest-taosd
tests/pytest/fulltest.sh
浏览文件 @
62d4dc8d
...
@@ -399,7 +399,11 @@ python3 ./test.py -f query/queryTbnameUpperLower.py
...
@@ -399,7 +399,11 @@ python3 ./test.py -f query/queryTbnameUpperLower.py
python3 ./test.py
-f
query/query.py
python3 ./test.py
-f
query/query.py
python3 ./test.py
-f
query/queryDiffColsOr.py
python3 ./test.py
-f
query/queryDiffColsOr.py
python3 ./test.py
-f
client/nettest.py
python3 ./test.py
-f
client/nettest.py
python3 ./test.py
-f
query/queryRegex.py
#======================p4-end===============
#======================p4-end===============
...
...
tests/pytest/query/queryGroupbyWithInterval.py
浏览文件 @
62d4dc8d
...
@@ -41,6 +41,14 @@ class TDTestCase:
...
@@ -41,6 +41,14 @@ class TDTestCase:
tdSql
.
execute
(
tdSql
.
execute
(
"insert into test22 using stest tags('test21','ccc') values ('2020-09-04 16:54:54.003',210,3)"
)
"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
.
query
(
"select sum(size) from stest interval(1d) group by appname"
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkRows
(
3
)
...
...
tests/pytest/query/queryRegex.py
0 → 100644
浏览文件 @
62d4dc8d
###################################################################
# 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
浏览文件 @
62d4dc8d
// 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
浏览文件 @
62d4dc8d
...
@@ -7,7 +7,10 @@ LFLAGS = '-Wl,-rpath,/usr/local/taos/driver/' -ltaos -lpthread -lm -lrt
...
@@ -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
\
CFLAGS
=
-O0
-g
-Wall
-Wno-deprecated
-fPIC
-Wno-unused-result
-Wconversion
\
-Wno-char-subscripts
-D_REENTRANT
-Wno-format
-D_REENTRANT
-DLINUX
\
-Wno-char-subscripts
-D_REENTRANT
-Wno-format
-D_REENTRANT
-DLINUX
\
-Wno-unused-function
-D_M_X64
-I
/usr/local/taos/include
-std
=
gnu99
\
-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)
all
:
$(TARGET)
...
@@ -16,11 +19,19 @@ exe:
...
@@ -16,11 +19,19 @@ exe:
gcc
$(CFLAGS)
./stmtBatchTest.c
-o
$(ROOT)
stmtBatchTest
$(LFLAGS)
gcc
$(CFLAGS)
./stmtBatchTest.c
-o
$(ROOT)
stmtBatchTest
$(LFLAGS)
gcc
$(CFLAGS)
./stmtTest.c
-o
$(ROOT)
stmtTest
$(LFLAGS)
gcc
$(CFLAGS)
./stmtTest.c
-o
$(ROOT)
stmtTest
$(LFLAGS)
gcc
$(CFLAGS)
./stmt_function.c
-o
$(ROOT)
stmt_function
$(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)
gcc
$(CFLAGS)
./openTSDBTest.c
-o
$(ROOT)openTSDBTest
$(LFLAGS)
clean
:
clean
:
rm
$(ROOT)
batchprepare
rm
$(ROOT)
batchprepare
rm
$(ROOT)
stmtBatchTest
rm
$(ROOT)
stmtBatchTest
rm
$(ROOT)
stmtTest
rm
$(ROOT)
stmtTest
rm
$(ROOT)
stmt_function
rm
$(ROOT)
stmt_function
rm
$(ROOT)clientcfgtest
rm
$(ROOT)openTSDBTest
rm
$(ROOT)openTSDBTest
tests/test-all.sh
浏览文件 @
62d4dc8d
...
@@ -233,6 +233,7 @@ totalPyFailed=0
...
@@ -233,6 +233,7 @@ totalPyFailed=0
totalJDBCFailed
=
0
totalJDBCFailed
=
0
totalUnitFailed
=
0
totalUnitFailed
=
0
totalExampleFailed
=
0
totalExampleFailed
=
0
totalApiFailed
=
0
if
[
"
${
OS
}
"
==
"Linux"
]
;
then
if
[
"
${
OS
}
"
==
"Linux"
]
;
then
corepath
=
`
grep
-oP
'.*(?=core_)'
/proc/sys/kernel/core_pattern||grep
-oP
'.*(?=core-)'
/proc/sys/kernel/core_pattern
`
corepath
=
`
grep
-oP
'.*(?=core_)'
/proc/sys/kernel/core_pattern||grep
-oP
'.*(?=core-)'
/proc/sys/kernel/core_pattern
`
...
@@ -532,6 +533,27 @@ if [ "$2" != "sim" ] && [ "$2" != "python" ] && [ "$2" != "jdbc" ] && [ "$2" !=
...
@@ -532,6 +533,27 @@ if [ "$2" != "sim" ] && [ "$2" != "python" ] && [ "$2" != "jdbc" ] && [ "$2" !=
echo
"demo pass"
echo
"demo pass"
totalExamplePass
=
`
expr
$totalExamplePass
+ 1
`
totalExamplePass
=
`
expr
$totalExamplePass
+ 1
`
fi
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
if
[
"
$totalExamplePass
"
-gt
"0"
]
;
then
echo
-e
"
\n
${
GREEN
}
### Total
$totalExamplePass
examples succeed! ###
${
NC
}
"
echo
-e
"
\n
${
GREEN
}
### Total
$totalExamplePass
examples succeed! ###
${
NC
}
"
...
@@ -544,7 +566,13 @@ if [ "$2" != "sim" ] && [ "$2" != "python" ] && [ "$2" != "jdbc" ] && [ "$2" !=
...
@@ -544,7 +566,13 @@ if [ "$2" != "sim" ] && [ "$2" != "python" ] && [ "$2" != "jdbc" ] && [ "$2" !=
if
[
"
${
OS
}
"
==
"Linux"
]
;
then
if
[
"
${
OS
}
"
==
"Linux"
]
;
then
dohavecore 1
dohavecore 1
fi
fi
fi
fi
exit
$((
$totalFailed
+
$totalPyFailed
+
$totalJDBCFailed
+
$totalUnitFailed
+
$totalExampleFailed
))
exit
$((
$totalFailed
+
$totalPyFailed
+
$totalJDBCFailed
+
$totalUnitFailed
+
$totalExampleFailed
))
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录