Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
3b546677
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看板
提交
3b546677
编写于
9月 14, 2021
作者:
L
liuyq-617
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update windows test framwork
上级
6cfbf4c5
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
84 addition
and
57 deletion
+84
-57
tests/pytest/fulltest.bat
tests/pytest/fulltest.bat
+20
-20
tests/pytest/insert/binary.py
tests/pytest/insert/binary.py
+5
-3
tests/pytest/insert/nchar.py
tests/pytest/insert/nchar.py
+2
-1
tests/pytest/query/queryNormal.py
tests/pytest/query/queryNormal.py
+4
-2
tests/pytest/test-all.bat
tests/pytest/test-all.bat
+13
-6
tests/pytest/util/dnodes.py
tests/pytest/util/dnodes.py
+40
-25
未找到文件。
tests/pytest/fulltest.bat
浏览文件 @
3b546677
python
.\test.py
-f
insert
\basic.py
-w
1
-m
u05
python
.\test.py
-f
insert
\int.py
-w
1
-m
u05
python
.\test.py
-f
insert
\float.py
-w
1
-m
u05
python
.\test.py
-f
insert
\bigint.py
-w
1
-m
u05
python
.\test.py
-f
insert
\bool.py
-w
1
-m
u05
python
.\test.py
-f
insert
\double.py
-w
1
-m
u05
python
.\test.py
-f
insert
\smallint.py
-w
1
-m
u05
python
.\test.py
-f
insert
\tinyint.py
-w
1
-m
u05
python
.\test.py
-f
insert
\date.py
-w
1
-m
u05
python
.\test.py
-f
insert
\binary.py
-w
1
-m
u05
python
.\test.py
-f
insert
\nchar.py
-w
1
-m
u05
python
.\test.py
-f
insert
\basic.py
python
.\test.py
-f
insert
\int.py
python
.\test.py
-f
insert
\float.py
python
.\test.py
-f
insert
\bigint.py
python
.\test.py
-f
insert
\bool.py
python
.\test.py
-f
insert
\double.py
python
.\test.py
-f
insert
\smallint.py
python
.\test.py
-f
insert
\tinyint.py
python
.\test.py
-f
insert
\date.py
python
.\test.py
-f
insert
\binary.py
python
.\test.py
-f
insert
\nchar.py
python
.\test.py
-f
query
\filter.py
-w
1
-m
u05
python
.\test.py
-f
query
\filterCombo.py
-w
1
-m
u05
python
.\test.py
-f
query
\queryNormal.py
-w
1
-m
u05
python
.\test.py
-f
query
\queryError.py
-w
1
-m
u05
python
.\test.py
-f
query
\filterAllIntTypes.py
-w
1
-m
u05
python
.\test.py
-f
query
\filterFloatAndDouble.py
-w
1
-m
u05
python
.\test.py
-f
query
\filterOtherTypes.py
-w
1
-m
u05
python
.\test.py
-f
query
\querySort.py
-w
1
-m
u05
python
.\test.py
-f
query
\queryJoin.py
-w
1
-m
u05
\ No newline at end of file
python
.\test.py
-f
query
\filter.py
python
.\test.py
-f
query
\filterCombo.py
python
.\test.py
-f
query
\queryNormal.py
python
.\test.py
-f
query
\queryError.py
python
.\test.py
-f
query
\filterAllIntTypes.py
python
.\test.py
-f
query
\filterFloatAndDouble.py
python
.\test.py
-f
query
\filterOtherTypes.py
python
.\test.py
-f
query
\querySort.py
python
.\test.py
-f
query
\queryJoin.py
\ No newline at end of file
tests/pytest/insert/binary.py
浏览文件 @
3b546677
# -*- coding: utf-8 -*-
import
platform
import
sys
from
util.log
import
*
from
util.cases
import
*
...
...
@@ -53,6 +54,7 @@ class TDTestCase:
tdLog
.
info
(
"tdSql.checkData(0, 0, '34567')"
)
tdSql
.
checkData
(
0
,
0
,
'34567'
)
tdLog
.
info
(
"insert into tb values (now+4a,
\"
'';
\"
)"
)
if
platform
.
system
()
==
"Linux"
:
config_dir
=
subprocess
.
check_output
(
str
(
"ps -ef |grep dnode1|grep -v grep |awk '{print $NF}'"
),
stderr
=
subprocess
.
STDOUT
,
shell
=
True
).
decode
(
'utf-8'
).
replace
(
'
\n
'
,
''
)
result
=
''
.
join
(
os
.
popen
(
r
"""taos -s "insert into db.tb values (now+4a, \"'';\")" -c %s"""
%
(
config_dir
)).
readlines
())
if
"Query OK"
not
in
result
:
tdLog
.
exit
(
"err:insert '';"
)
...
...
tests/pytest/insert/nchar.py
浏览文件 @
3b546677
...
...
@@ -15,6 +15,7 @@ import sys
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
import
platform
class
TDTestCase
:
...
...
@@ -37,7 +38,7 @@ class TDTestCase:
tdSql
.
error
(
"insert into tb values (now, 'taosdata001')"
)
tdSql
.
error
(
"insert into tb(now, 😀)"
)
if
platform
.
system
()
==
"Linux"
:
tdSql
.
error
(
"insert into tb(now, 😀)"
)
tdSql
.
query
(
"select * from tb"
)
tdSql
.
checkRows
(
2
)
...
...
tests/pytest/query/queryNormal.py
浏览文件 @
3b546677
...
...
@@ -17,6 +17,7 @@ from util.log import *
from
util.cases
import
*
from
util.sql
import
*
from
util.dnodes
import
*
import
platform
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
...
...
@@ -137,6 +138,7 @@ class TDTestCase:
tdSql
.
checkData
(
1
,
1
,
421
)
tdSql
.
checkData
(
1
,
2
,
"tm1"
)
if
platform
.
system
()
==
"Linux"
:
tdDnodes
.
stop
(
1
)
tdDnodes
.
start
(
1
)
...
...
tests/pytest/test-all.bat
浏览文件 @
3b546677
@echo
off
echo
locale
en_US
.UTF
-
8
>
"C:\\TDengine\\cfg\\taos.cfg"
echo
charset
UTF
-
8
>>
"C:\\TDengine\\cfg\\taos.cfg"
for
/F
"usebackq tokens=*"
%%i
in
(
f
.bat
)
do
(
SETLOCAL
EnableDelayedExpansion
for
/F
"tokens=1,2 delims=#"
%%a
in
(
'"prompt #$H#$E# & echo on & for
%%b
in (1) do rem"'
)
do
(
set
"DEL=
%%a
"
)
for
/F
"usebackq tokens=*"
%%i
in
(
fulltest
.bat
)
do
(
echo
Processing
%%i
call
%%i
ARG1
>
result
.txt
2
>
error
.txt
if
errorlevel
1
(
echo
failed
)
else
(
echo
sucess
)
call
%%i
ARG1
-w
1
-m
%
1
>
result
.txt
2
>
error
.txt
if
errorlevel
1
(
call
:colorEcho
0
c
"failed"
&
echo
.
)
else
(
call
:colorEcho
0
a
"Success"
&
echo
.
)
)
@echo
on
\ No newline at end of file
exit
:colorEcho
echo
off
<
nul
set
/p
".=
%DEL%
"
>
"
%
~2"
findstr
/v /a
:
%
1
/R
"
^$
"
"
%
~2"
nul
del
"
%
~2"
>
nul
2
>&
1
i
\ No newline at end of file
tests/pytest/util/dnodes.py
浏览文件 @
3b546677
...
...
@@ -15,6 +15,8 @@ import sys
import
os
import
os.path
import
platform
import
pathlib
import
shutil
import
subprocess
from
time
import
sleep
from
util.log
import
*
...
...
@@ -62,32 +64,45 @@ class TDSimClient:
cmd
=
"echo %s %s >> %s"
%
(
option
,
value
,
self
.
cfgPath
)
if
os
.
system
(
cmd
)
!=
0
:
tdLog
.
exit
(
cmd
)
def
os_string
(
self
,
path
):
os_path
=
path
.
replace
(
"/"
,
os
.
sep
)
return
os_path
def
deploy
(
self
):
self
.
logDir
=
"%s/sim/psim/log"
%
(
self
.
path
)
self
.
cfgDir
=
"%s/sim/psim/cfg"
%
(
self
.
path
)
self
.
cfgPath
=
"%s/sim/psim/cfg/taos.cfg"
%
(
self
.
path
)
cmd
=
"rm -rf "
+
self
.
logDir
if
os
.
system
(
cmd
)
!=
0
:
tdLog
.
exit
(
cmd
)
cmd
=
"mkdir -p "
+
self
.
logDir
if
os
.
system
(
cmd
)
!=
0
:
tdLog
.
exit
(
cmd
)
cmd
=
"rm -rf "
+
self
.
cfgDir
if
os
.
system
(
cmd
)
!=
0
:
tdLog
.
exit
(
cmd
)
cmd
=
"mkdir -p "
+
self
.
cfgDir
if
os
.
system
(
cmd
)
!=
0
:
tdLog
.
exit
(
cmd
)
cmd
=
"touch "
+
self
.
cfgPath
if
os
.
system
(
cmd
)
!=
0
:
tdLog
.
exit
(
cmd
)
self
.
logDir
=
self
.
os_string
(
"%s/sim/psim/log"
%
(
self
.
path
))
self
.
cfgDir
=
self
.
os_string
(
"%s/sim/psim/cfg"
%
(
self
.
path
))
self
.
cfgPath
=
self
.
os_string
(
"%s/sim/psim/cfg/taos.cfg"
%
(
self
.
path
))
# cmd = "rm -rf " + self.logDir
# if os.system(cmd) != 0:
# tdLog.exit(cmd)
if
os
.
path
.
exists
(
self
.
logDir
):
try
:
shutil
.
rmtree
(
self
.
logDir
)
except
:
tdLog
.
exit
(
"del %s failed"
%
self
.
logDir
)
# cmd = "mkdir -p " + self.logDir
# if os.system(cmd) != 0:
# tdLog.exit(cmd)
os
.
makedirs
(
self
.
logDir
)
# cmd = "rm -rf " + self.cfgDir
# if os.system(cmd) != 0:
# tdLog.exit(cmd)
if
os
.
path
.
exists
(
self
.
cfgDir
):
try
:
shutil
.
rmtree
(
self
.
cfgDir
)
except
:
tdLog
.
exit
(
"del %s failed"
%
self
.
cfgDir
)
# cmd = "mkdir -p " + self.cfgDir
# if os.system(cmd) != 0:
# tdLog.exit(cmd)
os
.
makedirs
(
self
.
cfgDir
)
# cmd = "touch " + self.cfgPath
# if os.system(cmd) != 0:
# tdLog.exit(cmd)
try
:
pathlib
.
Path
(
self
.
cfgPath
).
touch
()
except
:
tdLog
.
exit
(
"create %s failed"
%
self
.
cfgPath
)
if
self
.
testCluster
:
self
.
cfg
(
"masterIp"
,
"192.168.0.1"
)
self
.
cfg
(
"secondIp"
,
"192.168.0.2"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录