提交 731c70ac 编写于 作者: L liuyq-617

update test framework

上级 47662b58
......@@ -23,9 +23,9 @@ from util.log import *
class TDSimClient:
def __init__(self):
def __init__(self, path):
self.testCluster = False
self.path = path
self.cfgDict = {
"numOfLogLines": "100000000",
"numOfThreadsPerCore": "2.0",
......@@ -44,10 +44,7 @@ class TDSimClient:
"jnidebugFlag": "135",
"qdebugFlag": "135",
"telemetryReporting": "0",
}
def init(self, path):
self.__init__()
self.path = path
}
def getLogDir(self):
self.logDir = "%s/sim/psim/log" % (self.path)
......@@ -64,7 +61,7 @@ class TDSimClient:
self.cfgDict.update({option: value})
def cfg(self, option, value):
cmd = "echo '%s %s' >> %s" % (option, value, self.cfgPath)
cmd = "echo %s %s >> %s" % (option, value, self.cfgPath)
if os.system(cmd) != 0:
tdLog.exit(cmd)
def os_string(self,path):
......@@ -262,7 +259,7 @@ class TDDnode:
projPath = selfPath[:selfPath.find("tests")]
for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
if (("taosd") in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root)-len("/build/bin")]
......@@ -420,7 +417,7 @@ class TDDnode:
tdLog.exit(cmd)
def cfg(self, option, value):
cmd = "echo '%s %s' >> %s" % (option, value, self.cfgPath)
cmd = "echo %s %s >> %s" % (option, value, self.cfgPath)
if os.system(cmd) != 0:
tdLog.exit(cmd)
......@@ -496,8 +493,7 @@ class TDDnodes:
for i in range(len(self.dnodes)):
self.dnodes[i].init(self.path)
self.sim = TDSimClient()
self.sim.init(self.path)
self.sim = TDSimClient(self.path)
def setTestCluster(self, value):
self.testCluster = value
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册