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