未验证 提交 664b2a46 编写于 作者: H Hui Li 提交者: GitHub

Merge pull request #9137 from taosdata/xiaoping/add_test_case

reduce test execution time when taosBenchmark is not found
...@@ -30,6 +30,7 @@ class TDTestCase: ...@@ -30,6 +30,7 @@ class TDTestCase:
self.numberOfRecords = 1000000 self.numberOfRecords = 1000000
def getBuildPath(self): def getBuildPath(self):
buildPath=""
selfPath = os.path.dirname(os.path.realpath(__file__)) selfPath = os.path.dirname(os.path.realpath(__file__))
if ("community" in selfPath): if ("community" in selfPath):
...@@ -38,7 +39,7 @@ class TDTestCase: ...@@ -38,7 +39,7 @@ class TDTestCase:
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 and "taosBenchmark" 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")]
...@@ -48,7 +49,7 @@ class TDTestCase: ...@@ -48,7 +49,7 @@ class TDTestCase:
def insertDataAndAlterTable(self, threadID): def insertDataAndAlterTable(self, threadID):
buildPath = self.getBuildPath() buildPath = self.getBuildPath()
if (buildPath == ""): if (buildPath == ""):
tdLog.exit("taosd not found!") tdLog.exit("taosd or staosBenchmark not found!")
else: else:
tdLog.info("taosd found in %s" % buildPath) tdLog.info("taosd found in %s" % buildPath)
binPath = buildPath + "/build/bin/" binPath = buildPath + "/build/bin/"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册