提交 a3e326a9 编写于 作者: haoranc's avatar haoranc

[TD-12143]<test>:modify cfgPath

上级 df32470f
......@@ -34,11 +34,15 @@ class TDTestCase:
def getBuildPath(self) -> str:
selfPath = os.path.dirname(os.path.realpath(__file__))
global cfgPath
if ("community" in selfPath):
projPath = selfPath[:selfPath.find("community")]
cfgPath = projPath + "/community/sim/dnode1/cfg"
else:
projPath = selfPath[:selfPath.find("tests")]
cfgPath = projPath + "/sim/dnode1/cfg"
for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
......@@ -53,8 +57,10 @@ class TDTestCase:
if ("community" in selfPath):
cfgDir = self.getBuildPath() + "/community/sim/dnode1/cfg"
else:
cfgDir = self.getBuildPath() + "/sim/dnode1/cfg"
return cfgDir
def getCfgFile(self) -> str:
......@@ -85,8 +91,8 @@ class TDTestCase:
def TS834(self):
tdLog.printNoPrefix("==========TS-782==========")
tdSql.prepare()
cfgfile = self.getCfgFile()
buildPath = self.getBuildPath()
cfgfile = cfgPath + "/taos.cfg"
tdSql.execute("show variables")
res_com = tdSql.cursor.fetchall()
......
......@@ -33,6 +33,7 @@ class TDTestCase:
else:
projPath = selfPath[:selfPath.find("tests")]
cfgPath = projPath + "/sim/dnode1/cfg"
for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册