Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f999132f
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看板
提交
f999132f
编写于
5月 27, 2022
作者:
wafwerar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(os): windows run shell case
上级
38d69cc1
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
92 addition
and
50 deletion
+92
-50
tests/pytest/test.py
tests/pytest/test.py
+6
-6
tests/pytest/util/dnodes.py
tests/pytest/util/dnodes.py
+9
-9
tests/system-test/0-others/taosShellError.py
tests/system-test/0-others/taosShellError.py
+23
-9
tests/system-test/0-others/taosShellNetChk.py
tests/system-test/0-others/taosShellNetChk.py
+45
-16
tests/system-test/0-others/taosdMonitor.py
tests/system-test/0-others/taosdMonitor.py
+1
-1
tests/system-test/0-others/telemetry.py
tests/system-test/0-others/telemetry.py
+1
-1
tests/system-test/test.py
tests/system-test/test.py
+7
-8
未找到文件。
tests/pytest/test.py
浏览文件 @
f999132f
...
@@ -18,6 +18,7 @@ import getopt
...
@@ -18,6 +18,7 @@ import getopt
import
subprocess
import
subprocess
import
time
import
time
from
distutils.log
import
warn
as
printf
from
distutils.log
import
warn
as
printf
import
platform
from
util.log
import
*
from
util.log
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
...
@@ -36,8 +37,10 @@ if __name__ == "__main__":
...
@@ -36,8 +37,10 @@ if __name__ == "__main__":
stop
=
0
stop
=
0
restart
=
False
restart
=
False
windows
=
0
windows
=
0
opts
,
args
=
getopt
.
gnu_getopt
(
sys
.
argv
[
1
:],
'f:p:m:l:scghrw'
,
[
if
platform
.
system
().
lower
()
==
'windows'
:
'file='
,
'path='
,
'master'
,
'logSql'
,
'stop'
,
'cluster'
,
'valgrind'
,
'help'
,
'windows'
])
windows
=
1
opts
,
args
=
getopt
.
gnu_getopt
(
sys
.
argv
[
1
:],
'f:p:m:l:scghr'
,
[
'file='
,
'path='
,
'master'
,
'logSql'
,
'stop'
,
'cluster'
,
'valgrind'
,
'help'
,
'restart'
])
for
key
,
value
in
opts
:
for
key
,
value
in
opts
:
if
key
in
[
'-h'
,
'--help'
]:
if
key
in
[
'-h'
,
'--help'
]:
tdLog
.
printNoPrefix
(
tdLog
.
printNoPrefix
(
...
@@ -64,9 +67,6 @@ if __name__ == "__main__":
...
@@ -64,9 +67,6 @@ if __name__ == "__main__":
if
key
in
[
'-m'
,
'--master'
]:
if
key
in
[
'-m'
,
'--master'
]:
masterIp
=
value
masterIp
=
value
if
key
in
[
'-w'
,
'--windows'
]:
windows
=
1
if
key
in
[
'-l'
,
'--logSql'
]:
if
key
in
[
'-l'
,
'--logSql'
]:
if
(
value
.
upper
()
==
"TRUE"
):
if
(
value
.
upper
()
==
"TRUE"
):
logSql
=
True
logSql
=
True
...
@@ -146,7 +146,7 @@ if __name__ == "__main__":
...
@@ -146,7 +146,7 @@ if __name__ == "__main__":
else
:
else
:
pass
pass
tdDnodes
.
deploy
(
1
,{})
tdDnodes
.
deploy
(
1
,{})
tdDnodes
.
start
Win
(
1
)
tdDnodes
.
start
(
1
)
else
:
else
:
remote_conn
=
Connection
(
"root@%s"
%
host
)
remote_conn
=
Connection
(
"root@%s"
%
host
)
with
remote_conn
.
cd
(
'/var/lib/jenkins/workspace/TDinternal/community/tests/pytest'
):
with
remote_conn
.
cd
(
'/var/lib/jenkins/workspace/TDinternal/community/tests/pytest'
):
...
...
tests/pytest/util/dnodes.py
浏览文件 @
f999132f
...
@@ -333,7 +333,7 @@ class TDDnode:
...
@@ -333,7 +333,7 @@ class TDDnode:
if
self
.
deployed
==
0
:
if
self
.
deployed
==
0
:
tdLog
.
exit
(
"dnode:%d is not deployed"
%
(
self
.
index
))
tdLog
.
exit
(
"dnode:%d is not deployed"
%
(
self
.
index
))
cmd
=
"mintty -h never %s -c %s"
%
(
cmd
=
"mintty -h never
-w hide
%s -c %s"
%
(
binPath
,
self
.
cfgDir
)
binPath
,
self
.
cfgDir
)
if
(
taosadapterBinPath
!=
""
):
if
(
taosadapterBinPath
!=
""
):
...
@@ -424,9 +424,10 @@ class TDDnode:
...
@@ -424,9 +424,10 @@ class TDDnode:
time
.
sleep
(
1
)
time
.
sleep
(
1
)
processID
=
subprocess
.
check_output
(
processID
=
subprocess
.
check_output
(
psCmd
,
shell
=
True
).
decode
(
"utf-8"
)
psCmd
,
shell
=
True
).
decode
(
"utf-8"
)
for
port
in
range
(
6030
,
6041
):
if
not
platform
.
system
().
lower
()
==
'windows'
:
fuserCmd
=
"fuser -k -n tcp %d"
%
port
for
port
in
range
(
6030
,
6041
):
os
.
system
(
fuserCmd
)
fuserCmd
=
"fuser -k -n tcp %d"
%
port
os
.
system
(
fuserCmd
)
if
self
.
valgrind
:
if
self
.
valgrind
:
time
.
sleep
(
2
)
time
.
sleep
(
2
)
...
@@ -571,11 +572,10 @@ class TDDnodes:
...
@@ -571,11 +572,10 @@ class TDDnodes:
def
start
(
self
,
index
):
def
start
(
self
,
index
):
self
.
check
(
index
)
self
.
check
(
index
)
self
.
dnodes
[
index
-
1
].
start
()
if
platform
.
system
().
lower
()
==
'windows'
:
self
.
dnodes
[
index
-
1
].
startWin
()
def
startWin
(
self
,
index
):
else
:
self
.
check
(
index
)
self
.
dnodes
[
index
-
1
].
start
()
self
.
dnodes
[
index
-
1
].
startWin
()
def
startWithoutSleep
(
self
,
index
):
def
startWithoutSleep
(
self
,
index
):
self
.
check
(
index
)
self
.
check
(
index
)
...
...
tests/system-test/0-others/taosShellError.py
浏览文件 @
f999132f
...
@@ -3,7 +3,11 @@ import taos
...
@@ -3,7 +3,11 @@ import taos
import
sys
import
sys
import
time
import
time
import
socket
import
socket
import
pexpect
import
platform
if
platform
.
system
().
lower
()
==
'windows'
:
import
wexpect
as
taosExpect
else
:
import
pexpect
as
taosExpect
import
os
import
os
from
util.log
import
*
from
util.log
import
*
...
@@ -15,7 +19,11 @@ def taos_command (buildPath, key, value, expectString, cfgDir, sqlString='', key
...
@@ -15,7 +19,11 @@ def taos_command (buildPath, key, value, expectString, cfgDir, sqlString='', key
if
len
(
key
)
==
0
:
if
len
(
key
)
==
0
:
tdLog
.
exit
(
"taos test key is null!"
)
tdLog
.
exit
(
"taos test key is null!"
)
taosCmd
=
buildPath
+
'/build/bin/taos '
if
platform
.
system
().
lower
()
==
'windows'
:
taosCmd
=
buildPath
+
'
\\
build
\\
bin
\\
taos.exe '
taosCmd
=
taosCmd
.
replace
(
'
\\
'
,
'
\\\\
'
)
else
:
taosCmd
=
buildPath
+
'/build/bin/taos '
if
len
(
cfgDir
)
!=
0
:
if
len
(
cfgDir
)
!=
0
:
taosCmd
=
taosCmd
+
'-c '
+
cfgDir
taosCmd
=
taosCmd
+
'-c '
+
cfgDir
...
@@ -36,23 +44,29 @@ def taos_command (buildPath, key, value, expectString, cfgDir, sqlString='', key
...
@@ -36,23 +44,29 @@ def taos_command (buildPath, key, value, expectString, cfgDir, sqlString='', key
tdLog
.
info
(
"taos cmd: %s"
%
taosCmd
)
tdLog
.
info
(
"taos cmd: %s"
%
taosCmd
)
child
=
pe
xpect
.
spawn
(
taosCmd
,
timeout
=
3
)
child
=
taosE
xpect
.
spawn
(
taosCmd
,
timeout
=
3
)
#output = child.readline()
#output = child.readline()
#print (output.decode())
#print (output.decode())
if
len
(
expectString
)
!=
0
:
if
len
(
expectString
)
!=
0
:
i
=
child
.
expect
([
expectString
,
pexpect
.
TIMEOUT
,
pe
xpect
.
EOF
],
timeout
=
6
)
i
=
child
.
expect
([
expectString
,
taosExpect
.
TIMEOUT
,
taosE
xpect
.
EOF
],
timeout
=
6
)
else
:
else
:
i
=
child
.
expect
([
pexpect
.
TIMEOUT
,
pe
xpect
.
EOF
],
timeout
=
6
)
i
=
child
.
expect
([
taosExpect
.
TIMEOUT
,
taosE
xpect
.
EOF
],
timeout
=
6
)
retResult
=
child
.
before
.
decode
()
if
platform
.
system
().
lower
()
==
'windows'
:
retResult
=
child
.
before
else
:
retResult
=
child
.
before
.
decode
()
print
(
"cmd return result:
\n
%s
\n
"
%
retResult
)
print
(
"cmd return result:
\n
%s
\n
"
%
retResult
)
#print(child.after.decode())
#print(child.after.decode())
if
i
==
0
:
if
i
==
0
:
print
(
'taos login success! Here can run sql, taos> '
)
print
(
'taos login success! Here can run sql, taos> '
)
if
len
(
sqlString
)
!=
0
:
if
len
(
sqlString
)
!=
0
:
child
.
sendline
(
sqlString
)
child
.
sendline
(
sqlString
)
w
=
child
.
expect
([
"Query OK"
,
pexpect
.
TIMEOUT
,
pexpect
.
EOF
],
timeout
=
1
)
w
=
child
.
expect
([
"Query OK"
,
taosExpect
.
TIMEOUT
,
taosExpect
.
EOF
],
timeout
=
1
)
retResult
=
child
.
before
.
decode
()
if
platform
.
system
().
lower
()
==
'windows'
:
retResult
=
child
.
before
else
:
retResult
=
child
.
before
.
decode
()
if
w
==
0
:
if
w
==
0
:
return
"TAOS_OK"
,
retResult
return
"TAOS_OK"
,
retResult
else
:
else
:
...
@@ -103,7 +117,7 @@ class TDTestCase:
...
@@ -103,7 +117,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
...
tests/system-test/0-others/taosShellNetChk.py
浏览文件 @
f999132f
...
@@ -3,7 +3,11 @@ import taos
...
@@ -3,7 +3,11 @@ import taos
import
sys
import
sys
import
time
import
time
import
socket
import
socket
import
pexpect
import
platform
if
platform
.
system
().
lower
()
==
'windows'
:
import
wexpect
as
taosExpect
else
:
import
pexpect
as
taosExpect
import
os
import
os
from
util.log
import
*
from
util.log
import
*
...
@@ -15,7 +19,11 @@ def taos_command (buildPath, key, value, expectString, cfgDir, sqlString='', key
...
@@ -15,7 +19,11 @@ def taos_command (buildPath, key, value, expectString, cfgDir, sqlString='', key
if
len
(
key
)
==
0
:
if
len
(
key
)
==
0
:
tdLog
.
exit
(
"taos test key is null!"
)
tdLog
.
exit
(
"taos test key is null!"
)
taosCmd
=
buildPath
+
'/build/bin/taos '
if
platform
.
system
().
lower
()
==
'windows'
:
taosCmd
=
buildPath
+
'
\\
build
\\
bin
\\
taos.exe '
taosCmd
=
taosCmd
.
replace
(
'
\\
'
,
'
\\\\
'
)
else
:
taosCmd
=
buildPath
+
'/build/bin/taos '
if
len
(
cfgDir
)
!=
0
:
if
len
(
cfgDir
)
!=
0
:
taosCmd
=
taosCmd
+
'-c '
+
cfgDir
taosCmd
=
taosCmd
+
'-c '
+
cfgDir
...
@@ -36,23 +44,29 @@ def taos_command (buildPath, key, value, expectString, cfgDir, sqlString='', key
...
@@ -36,23 +44,29 @@ def taos_command (buildPath, key, value, expectString, cfgDir, sqlString='', key
tdLog
.
info
(
"taos cmd: %s"
%
taosCmd
)
tdLog
.
info
(
"taos cmd: %s"
%
taosCmd
)
child
=
pe
xpect
.
spawn
(
taosCmd
,
timeout
=
3
)
child
=
taosE
xpect
.
spawn
(
taosCmd
,
timeout
=
3
)
#output = child.readline()
#output = child.readline()
#print (output.decode())
#print (output.decode())
if
len
(
expectString
)
!=
0
:
if
len
(
expectString
)
!=
0
:
i
=
child
.
expect
([
expectString
,
pexpect
.
TIMEOUT
,
pe
xpect
.
EOF
],
timeout
=
6
)
i
=
child
.
expect
([
expectString
,
taosExpect
.
TIMEOUT
,
taosE
xpect
.
EOF
],
timeout
=
6
)
else
:
else
:
i
=
child
.
expect
([
pexpect
.
TIMEOUT
,
pe
xpect
.
EOF
],
timeout
=
6
)
i
=
child
.
expect
([
taosExpect
.
TIMEOUT
,
taosE
xpect
.
EOF
],
timeout
=
6
)
retResult
=
child
.
before
.
decode
()
if
platform
.
system
().
lower
()
==
'windows'
:
retResult
=
child
.
before
else
:
retResult
=
child
.
before
.
decode
()
print
(
"expect() return code: %d, content:
\n
%s
\n
"
%
(
i
,
retResult
))
print
(
"expect() return code: %d, content:
\n
%s
\n
"
%
(
i
,
retResult
))
#print(child.after.decode())
#print(child.after.decode())
if
i
==
0
:
if
i
==
0
:
print
(
'taos login success! Here can run sql, taos> '
)
print
(
'taos login success! Here can run sql, taos> '
)
if
len
(
sqlString
)
!=
0
:
if
len
(
sqlString
)
!=
0
:
child
.
sendline
(
sqlString
)
child
.
sendline
(
sqlString
)
w
=
child
.
expect
([
"Query OK"
,
pexpect
.
TIMEOUT
,
pexpect
.
EOF
],
timeout
=
1
)
w
=
child
.
expect
([
"Query OK"
,
taosExpect
.
TIMEOUT
,
taosExpect
.
EOF
],
timeout
=
1
)
retResult
=
child
.
before
.
decode
()
if
platform
.
system
().
lower
()
==
'windows'
:
retResult
=
child
.
before
else
:
retResult
=
child
.
before
.
decode
()
if
w
==
0
:
if
w
==
0
:
return
"TAOS_OK"
,
retResult
return
"TAOS_OK"
,
retResult
else
:
else
:
...
@@ -103,7 +117,7 @@ class TDTestCase:
...
@@ -103,7 +117,7 @@ class TDTestCase:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
...
@@ -168,21 +182,33 @@ class TDTestCase:
...
@@ -168,21 +182,33 @@ class TDTestCase:
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
role
=
'server'
role
=
'server'
taosCmd
=
'nohup '
+
buildPath
+
'/build/bin/taos -c '
+
keyDict
[
'c'
]
if
platform
.
system
().
lower
()
==
'windows'
:
taosCmd
=
taosCmd
+
' -n '
+
role
+
' > /dev/null 2>&1 &'
taosCmd
=
'mintty -h never -w hide '
+
buildPath
+
'
\\
build
\\
bin
\\
taos.exe -c '
+
keyDict
[
'c'
]
taosCmd
=
taosCmd
.
replace
(
'
\\
'
,
'
\\\\
'
)
taosCmd
=
taosCmd
+
' -n '
+
role
else
:
taosCmd
=
'nohup '
+
buildPath
+
'/build/bin/taos -c '
+
keyDict
[
'c'
]
taosCmd
=
taosCmd
+
' -n '
+
role
+
' > /dev/null 2>&1 &'
print
(
taosCmd
)
print
(
taosCmd
)
os
.
system
(
taosCmd
)
os
.
system
(
taosCmd
)
pktLen
=
'2000'
pktLen
=
'2000'
pktNum
=
'10'
pktNum
=
'10'
role
=
'client'
role
=
'client'
taosCmd
=
buildPath
+
'/build/bin/taos -c '
+
keyDict
[
'c'
]
if
platform
.
system
().
lower
()
==
'windows'
:
taosCmd
=
buildPath
+
'
\\
build
\\
bin
\\
taos.exe -c '
+
keyDict
[
'c'
]
taosCmd
=
taosCmd
.
replace
(
'
\\
'
,
'
\\\\
'
)
else
:
taosCmd
=
buildPath
+
'/build/bin/taos -c '
+
keyDict
[
'c'
]
taosCmd
=
taosCmd
+
' -n '
+
role
+
' -l '
+
pktLen
+
' -N '
+
pktNum
taosCmd
=
taosCmd
+
' -n '
+
role
+
' -l '
+
pktLen
+
' -N '
+
pktNum
print
(
taosCmd
)
print
(
taosCmd
)
child
=
pe
xpect
.
spawn
(
taosCmd
,
timeout
=
3
)
child
=
taosE
xpect
.
spawn
(
taosCmd
,
timeout
=
3
)
i
=
child
.
expect
([
pexpect
.
TIMEOUT
,
pe
xpect
.
EOF
],
timeout
=
6
)
i
=
child
.
expect
([
taosExpect
.
TIMEOUT
,
taosE
xpect
.
EOF
],
timeout
=
6
)
retResult
=
child
.
before
.
decode
()
if
platform
.
system
().
lower
()
==
'windows'
:
retResult
=
child
.
before
else
:
retResult
=
child
.
before
.
decode
()
print
(
"expect() return code: %d, content:
\n
%s
\n
"
%
(
i
,
retResult
))
print
(
"expect() return code: %d, content:
\n
%s
\n
"
%
(
i
,
retResult
))
#print(child.after.decode())
#print(child.after.decode())
if
i
==
0
:
if
i
==
0
:
...
@@ -195,7 +221,10 @@ class TDTestCase:
...
@@ -195,7 +221,10 @@ class TDTestCase:
else
:
else
:
tdLog
.
exit
(
'taos -n client fail!'
)
tdLog
.
exit
(
'taos -n client fail!'
)
os
.
system
(
'pkill taos'
)
if
platform
.
system
().
lower
()
==
'windows'
:
os
.
system
(
'ps -a | grep taos | awk
\'
{print $2}
\'
| xargs kill -9'
)
else
:
os
.
system
(
'pkill taos'
)
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
...
...
tests/system-test/0-others/taosdMonitor.py
浏览文件 @
f999132f
...
@@ -2,7 +2,7 @@ import taos
...
@@ -2,7 +2,7 @@ import taos
import
sys
import
sys
import
time
import
time
import
socket
import
socket
import
pexpect
#
import pexpect
import
os
import
os
import
http.server
import
http.server
import
gzip
import
gzip
...
...
tests/system-test/0-others/telemetry.py
浏览文件 @
f999132f
...
@@ -2,7 +2,7 @@ import taos
...
@@ -2,7 +2,7 @@ import taos
import
sys
import
sys
import
time
import
time
import
socket
import
socket
import
pexpect
#
import pexpect
import
os
import
os
import
http.server
import
http.server
import
gzip
import
gzip
...
...
tests/system-test/test.py
浏览文件 @
f999132f
...
@@ -19,6 +19,7 @@ import subprocess
...
@@ -19,6 +19,7 @@ import subprocess
import
time
import
time
import
base64
import
base64
import
json
import
json
import
platform
from
distutils.log
import
warn
as
printf
from
distutils.log
import
warn
as
printf
from
fabric2
import
Connection
from
fabric2
import
Connection
sys
.
path
.
append
(
"../pytest"
)
sys
.
path
.
append
(
"../pytest"
)
...
@@ -40,9 +41,11 @@ if __name__ == "__main__":
...
@@ -40,9 +41,11 @@ if __name__ == "__main__":
stop
=
0
stop
=
0
restart
=
False
restart
=
False
windows
=
0
windows
=
0
if
platform
.
system
().
lower
()
==
'windows'
:
windows
=
1
updateCfgDict
=
{}
updateCfgDict
=
{}
opts
,
args
=
getopt
.
gnu_getopt
(
sys
.
argv
[
1
:],
'f:p:m:l:scghr
w
d:'
,
[
opts
,
args
=
getopt
.
gnu_getopt
(
sys
.
argv
[
1
:],
'f:p:m:l:scghrd:'
,
[
'file='
,
'path='
,
'master'
,
'logSql'
,
'stop'
,
'cluster'
,
'valgrind'
,
'help'
,
'
windows
'
,
'updateCfgDict'
])
'file='
,
'path='
,
'master'
,
'logSql'
,
'stop'
,
'cluster'
,
'valgrind'
,
'help'
,
'
restart
'
,
'updateCfgDict'
])
for
key
,
value
in
opts
:
for
key
,
value
in
opts
:
if
key
in
[
'-h'
,
'--help'
]:
if
key
in
[
'-h'
,
'--help'
]:
tdLog
.
printNoPrefix
(
tdLog
.
printNoPrefix
(
...
@@ -55,7 +58,6 @@ if __name__ == "__main__":
...
@@ -55,7 +58,6 @@ if __name__ == "__main__":
tdLog
.
printNoPrefix
(
'-c Test Cluster Flag'
)
tdLog
.
printNoPrefix
(
'-c Test Cluster Flag'
)
tdLog
.
printNoPrefix
(
'-g valgrind Test Flag'
)
tdLog
.
printNoPrefix
(
'-g valgrind Test Flag'
)
tdLog
.
printNoPrefix
(
'-r taosd restart test'
)
tdLog
.
printNoPrefix
(
'-r taosd restart test'
)
tdLog
.
printNoPrefix
(
'-w taos on windows'
)
tdLog
.
printNoPrefix
(
'-d update cfg dict, base64 json str'
)
tdLog
.
printNoPrefix
(
'-d update cfg dict, base64 json str'
)
sys
.
exit
(
0
)
sys
.
exit
(
0
)
...
@@ -89,9 +91,6 @@ if __name__ == "__main__":
...
@@ -89,9 +91,6 @@ if __name__ == "__main__":
if
key
in
[
'-s'
,
'--stop'
]:
if
key
in
[
'-s'
,
'--stop'
]:
stop
=
1
stop
=
1
if
key
in
[
'-w'
,
'--windows'
]:
windows
=
1
if
key
in
[
'-d'
,
'--updateCfgDict'
]:
if
key
in
[
'-d'
,
'--updateCfgDict'
]:
try
:
try
:
updateCfgDict
=
eval
(
base64
.
b64decode
(
value
.
encode
()).
decode
())
updateCfgDict
=
eval
(
base64
.
b64decode
(
value
.
encode
()).
decode
())
...
@@ -163,13 +162,13 @@ if __name__ == "__main__":
...
@@ -163,13 +162,13 @@ if __name__ == "__main__":
pass
pass
tdDnodes
.
deploy
(
1
,
updateCfgDict
)
tdDnodes
.
deploy
(
1
,
updateCfgDict
)
if
masterIp
==
""
or
masterIp
==
"localhost"
:
if
masterIp
==
""
or
masterIp
==
"localhost"
:
tdDnodes
.
start
Win
(
1
)
tdDnodes
.
start
(
1
)
else
:
else
:
remote_conn
=
Connection
(
"root@%s"
%
host
)
remote_conn
=
Connection
(
"root@%s"
%
host
)
with
remote_conn
.
cd
(
'/var/lib/jenkins/workspace/TDinternal/community/tests/pytest'
):
with
remote_conn
.
cd
(
'/var/lib/jenkins/workspace/TDinternal/community/tests/pytest'
):
remote_conn
.
run
(
"python3 ./test.py %s"
%
updateCfgDictStr
)
remote_conn
.
run
(
"python3 ./test.py %s"
%
updateCfgDictStr
)
# print("docker exec -d cross_platform bash -c \"cd ~/test/community/tests/system-test && python3 ./test.py %s\""%updateCfgDictStr)
# print("docker exec -d cross_platform bash -c \"cd ~/test/community/tests/system-test && python3 ./test.py %s\""%updateCfgDictStr)
# os.system("docker exec -d cross_platform bash -c \"cd ~/test/community/tests/system-test && python3 ./test.py %s\""%updateCfgDictStr)
# os.system("docker exec -d cross_platform bash -c \"cd ~/test/community/tests/system-test &&
(ps -aux | grep taosd | head -n 1 | awk '{print $2}' | xargs kill -9) && rm -rf /root/test/sim/dnode1/data/ &&
python3 ./test.py %s\""%updateCfgDictStr)
# time.sleep(2)
# time.sleep(2)
conn
=
taos
.
connect
(
conn
=
taos
.
connect
(
host
=
"%s"
%
(
host
),
host
=
"%s"
%
(
host
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录