diff --git a/tests/pytest/tools/taosdemoTestTblAlt.py b/tests/pytest/tools/taosdemoTestTblAlt.py index 7587ab9eb3e89275451864d28ccf985bcaac949a..444aab519bf7089b792125ffa3caa6de5ad4eb8d 100644 --- a/tests/pytest/tools/taosdemoTestTblAlt.py +++ b/tests/pytest/tools/taosdemoTestTblAlt.py @@ -30,6 +30,7 @@ class TDTestCase: self.numberOfRecords = 1000000 def getBuildPath(self): + buildPath="" selfPath = os.path.dirname(os.path.realpath(__file__)) if ("community" in selfPath): @@ -38,7 +39,7 @@ class TDTestCase: projPath = selfPath[:selfPath.find("tests")] 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)) if ("packaging" not in rootRealPath): buildPath = root[:len(root) - len("/build/bin")] @@ -48,7 +49,7 @@ class TDTestCase: def insertDataAndAlterTable(self, threadID): buildPath = self.getBuildPath() if (buildPath == ""): - tdLog.exit("taosd not found!") + tdLog.exit("taosd or staosBenchmark not found!") else: tdLog.info("taosd found in %s" % buildPath) binPath = buildPath + "/build/bin/"