fix test.py to support steven's case

This commit is contained in:
Shuduo Sang 2020-05-01 18:15:38 +08:00
parent 5e425abfc7
commit 4191754f24
2 changed files with 34 additions and 35 deletions

View File

@ -34,12 +34,12 @@ python3 ./test.py $1 -f table/db_table.py
python3 ./test.py -s $1 python3 ./test.py -s $1
sleep 1 sleep 1
python3 ./test.py $1 -f import_merge/importDataLastTO.py #python3 ./test.py $1 -f import_merge/importDataLastTO.py
python3 ./test.py -s $1 #python3 ./test.py -s $1
sleep 1 #sleep 1
python3 ./test.py $1 -f import_merge/importDataLastT.py #python3 ./test.py $1 -f import_merge/importDataLastT.py
python3 ./test.py -s $1 #python3 ./test.py -s $1
sleep 1 #sleep 1
python3 ./test.py $1 -f import_merge/importDataTO.py python3 ./test.py $1 -f import_merge/importDataTO.py
python3 ./test.py -s $1 python3 ./test.py -s $1
sleep 1 sleep 1

View File

@ -83,36 +83,35 @@ if __name__ == "__main__":
tdLog.exit('stop All dnodes') tdLog.exit('stop All dnodes')
if masterIp == "": tdDnodes.init(deployPath)
tdDnodes.init(deployPath) tdDnodes.setTestCluster(testCluster)
tdDnodes.setTestCluster(testCluster) tdDnodes.setValgrind(valgrind)
tdDnodes.setValgrind(valgrind)
if testCluster: tdDnodes.stopAll()
tdLog.notice("Procedures for testing cluster") tdDnodes.deploy(1)
if fileName == "all": tdDnodes.start(1)
tdCases.runAllCluster()
else: if masterIp == "":
tdCases.runOneCluster(fileName) host='127.0.0.1'
else:
tdLog.notice("Procedures for testing self-deployment")
tdDnodes.stopAll()
tdDnodes.deploy(1)
tdDnodes.start(1)
conn = taos.connect(
host='127.0.0.1',
config=tdDnodes.getSimCfgPath())
if fileName == "all":
tdCases.runAllLinux(conn)
else:
tdCases.runOneLinux(conn, fileName)
conn.close()
else: else:
tdLog.notice("Procedures for tdengine deployed in %s" % (masterIp)) host=masterIp
cfgPath = "../../build/test/cfg" # was: tdDnodes.getSimCfgPath()
conn = taos.connect(host=masterIp, config=cfgPath) tdLog.notice("Procedures for tdengine deployed in %s" % (host))
if testCluster:
tdLog.notice("Procedures for testing cluster")
if fileName == "all": if fileName == "all":
tdCases.runAllWindows(conn) tdCases.runAllCluster()
else: else:
tdCases.runOneWindows(conn, fileName) tdCases.runOneCluster(fileName)
conn.close() else:
tdLog.notice("Procedures for testing self-deployment")
conn = taos.connect(
host,
config=tdDnodes.getSimCfgPath())
if fileName == "all":
tdCases.runAllLinux(conn)
else:
tdCases.runOneLinux(conn, fileName)
conn.close()