提交 5a15739c 编写于 作者: wafwerar's avatar wafwerar

fix(os): run case on win

上级 704fc256
...@@ -148,17 +148,13 @@ if __name__ == "__main__": ...@@ -148,17 +148,13 @@ if __name__ == "__main__":
tdDnodes.deploy(1,{}) tdDnodes.deploy(1,{})
tdDnodes.startWin(1) tdDnodes.startWin(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") remote_conn.run("python3 ./test.py")
os.system("docker exec -d tdengine_test bash -c \"cd ~/TDinternal/community/tests/pytest && python3 ./test.py\"")
time.sleep(2)
tdDnodes.init(deployPath) tdDnodes.init(deployPath)
conn = taos.connect( conn = taos.connect(
host="%s" % (host), host="%s" % (host),
config=tdDnodes.sim.getCfgDir()) config=tdDnodes.sim.getCfgDir())
print(host)
print(tdDnodes.sim.getCfgDir())
tdCases.runOneWindows(conn, fileName) tdCases.runOneWindows(conn, fileName)
tdCases.logSql(logSql) tdCases.logSql(logSql)
else: else:
......
...@@ -518,8 +518,7 @@ class TDDnodes: ...@@ -518,8 +518,7 @@ class TDDnodes:
processID = subprocess.check_output( processID = subprocess.check_output(
psCmd, shell=True).decode("utf-8") psCmd, shell=True).decode("utf-8")
binPath = os.path.dirname(os.path.realpath(__file__)) binPath = self.dnodes[0].getPath() + "/../../../"
binPath = binPath + "/../../../debug/"
tdLog.debug("binPath %s" % (binPath)) tdLog.debug("binPath %s" % (binPath))
binPath = os.path.realpath(binPath) binPath = os.path.realpath(binPath)
tdLog.debug("binPath real path %s" % (binPath)) tdLog.debug("binPath real path %s" % (binPath))
...@@ -546,7 +545,6 @@ class TDDnodes: ...@@ -546,7 +545,6 @@ class TDDnodes:
for i in range(len(self.dnodes)): for i in range(len(self.dnodes)):
self.dnodes[i].init(self.path) self.dnodes[i].init(self.path)
print(self.path)
self.sim = TDSimClient(self.path) self.sim = TDSimClient(self.path)
def setTestCluster(self, value): def setTestCluster(self, value):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册