未验证 提交 bd328657 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

Hotfix/sangshuduo/td 12659 taostools 100 (#9605)

* [TD-12659]<fix>(tools): taos-tools 1.0.0

* [TD-12659]<fix>(tools): taos-tools 1.0.0

* [TD-12659]<fix>(tools): taosTools 1.0.0

fix tests/system-test/5-taos-tools/dump_col_tag.py

* [TD12659]<fix>(tools): taosTools 1.0.0

fix system-test/5-taos-tools/dump_col_tag.py

* [TD12659]<fix>(tools): taosTools 1.0.0

fix system-test/5-taos-tools/dump_col_tag.py again

* [TD-12659]<fix>(tools): taosdump system test

* [TD-12659]<fix>(tools): fix test case

fix runOneWindow with runOneLinux

* [TD-12659]<fix>(tools): taosdump support unsigned types

update taos-tools

* [TD-12659]<fix>(tools): taosTools test case

update tests/pytest/tools/taosdemoTestInterlace.py

* [TD-12659]<fix>(tools): taosTools test script

update latest taosTools
上级 28edd2e4
Subproject commit 00792e2c1a1ee61952e49dbcc33f28ebe4e2c45d
Subproject commit 5c944c1c93c63112890c8c65e1f57cfa6bd89179
......@@ -28,7 +28,7 @@ import taos
if __name__ == "__main__":
fileName = "all"
deployPath = ""
masterIp = ""
......@@ -55,7 +55,7 @@ if __name__ == "__main__":
tdLog.printNoPrefix('-w taos on windows')
sys.exit(0)
if key in ['-r', '--restart']:
if key in ['-r', '--restart']:
restart = True
if key in ['-f', '--file']:
......@@ -117,7 +117,7 @@ if __name__ == "__main__":
time.sleep(2)
tdLog.info('stop All dnodes')
if masterIp == "":
host = '127.0.0.1'
else:
......@@ -129,11 +129,11 @@ if __name__ == "__main__":
tdLog.info("Procedures for testing self-deployment")
td_clinet = TDSimClient("C:\\TDengine")
td_clinet.deploy()
remote_conn = Connection("root@%s"%host)
remote_conn = Connection("root@%s" % host)
with remote_conn.cd('/var/lib/jenkins/workspace/TDinternal/community/tests/pytest'):
remote_conn.run("python3 ./test.py")
conn = taos.connect(
host="%s"%(host),
host="%s" % (host),
config=td_clinet.cfgDir)
tdCases.runOneWindows(conn, fileName)
else:
......@@ -146,22 +146,21 @@ if __name__ == "__main__":
try:
if key_word in open(fileName).read():
is_test_framework = 1
except:
except BaseException:
pass
if is_test_framework:
moduleName = fileName.replace(".py", "").replace("/", ".")
uModule = importlib.import_module(moduleName)
try:
ucase = uModule.TDTestCase()
tdDnodes.deploy(1,ucase.updatecfgDict)
except :
tdDnodes.deploy(1,{})
tdDnodes.deploy(1, ucase.updatecfgDict)
except BaseException:
tdDnodes.deploy(1, {})
else:
pass
tdDnodes.deploy(1,{})
tdDnodes.start(1)
tdDnodes.deploy(1, {})
tdDnodes.start(1)
tdCases.logSql(logSql)
......@@ -179,18 +178,20 @@ if __name__ == "__main__":
if fileName == "all":
tdCases.runAllLinux(conn)
else:
tdCases.runOneWindows(conn, fileName)
tdCases.runOneLinux(conn, fileName)
if restart:
if fileName == "all":
tdLog.info("not need to query ")
else:
else:
sp = fileName.rsplit(".", 1)
if len(sp) == 2 and sp[1] == "py":
tdDnodes.stopAll()
tdDnodes.start(1)
time.sleep(1)
conn = taos.connect( host, config=tdDnodes.getSimCfgPath())
tdLog.info("Procedures for tdengine deployed in %s" % (host))
time.sleep(1)
conn = taos.connect(host, config=tdDnodes.getSimCfgPath())
tdLog.info(
"Procedures for tdengine deployed in %s" %
(host))
tdLog.info("query test after taosd restart")
tdCases.runOneLinux(conn, sp[0] + "_" + "restart.py")
else:
......
......@@ -54,7 +54,7 @@ if __name__ == "__main__":
tdLog.printNoPrefix('-w taos on windows')
sys.exit(0)
if key in ['-r', '--restart']:
if key in ['-r', '--restart']:
restart = True
if key in ['-f', '--file']:
......@@ -116,7 +116,7 @@ if __name__ == "__main__":
time.sleep(2)
tdLog.info('stop All dnodes')
if masterIp == "":
host = '127.0.0.1'
else:
......@@ -157,7 +157,7 @@ if __name__ == "__main__":
with remote_conn.cd('/var/lib/jenkins/workspace/TDinternal/community/tests/pytest'):
remote_conn.run("python3 ./test.py")
conn = taos.connect(
host="%s"%(host),
host="%s" % (host),
config=td_clinet.cfgDir)
tdCases.runOneWindows(conn, fileName)
else:
......@@ -170,23 +170,21 @@ if __name__ == "__main__":
try:
if key_word in open(fileName).read():
is_test_framework = 1
except:
except BaseException:
pass
if is_test_framework:
moduleName = fileName.replace(".py", "").replace(os.sep, ".")
uModule = importlib.import_module(moduleName)
try:
ucase = uModule.TDTestCase()
tdDnodes.deploy(1,ucase.updatecfgDict)
except :
tdDnodes.deploy(1,{})
tdDnodes.deploy(1, ucase.updatecfgDict)
except BaseException:
tdDnodes.deploy(1, {})
else:
pass
tdDnodes.deploy(1,{})
tdDnodes.deploy(1, {})
tdDnodes.start(1)
tdCases.logSql(logSql)
if testCluster:
......@@ -203,18 +201,20 @@ if __name__ == "__main__":
if fileName == "all":
tdCases.runAllLinux(conn)
else:
tdCases.runOneWindows(conn, fileName)
tdCases.runOneLinux(conn, fileName)
if restart:
if fileName == "all":
tdLog.info("not need to query ")
else:
else:
sp = fileName.rsplit(".", 1)
if len(sp) == 2 and sp[1] == "py":
tdDnodes.stopAll()
tdDnodes.start(1)
time.sleep(1)
conn = taos.connect( host, config=tdDnodes.getSimCfgPath())
tdLog.info("Procedures for tdengine deployed in %s" % (host))
time.sleep(1)
conn = taos.connect(host, config=tdDnodes.getSimCfgPath())
tdLog.info(
"Procedures for tdengine deployed in %s" %
(host))
tdLog.info("query test after taosd restart")
tdCases.runOneLinux(conn, sp[0] + "_" + "restart.py")
else:
......
......@@ -44,6 +44,7 @@ class TDTestCase:
else:
projPath = selfPath[:selfPath.find("tests")]
buildPath = ""
for root, dirs, files in os.walk(projPath):
if ("taosdump" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
......
python3 ./test.py -f 5-taos-tools/basic.py
python3 ./test.py -f 5-taos-tools/TD-12478.py
python3 ./test.py -f 5-taos-tools/dump_col_tag.py
python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestColTag.py
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册