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

update test framework

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