make pytest support both TDinternal and community

[TD-555]
This commit is contained in:
Shuduo Sang 2020-06-08 16:50:42 +08:00
parent b591ad7c8d
commit 9ccf152f42
1 changed files with 3 additions and 3 deletions

View File

@ -194,13 +194,13 @@ class TDDnode:
selfPath = os.path.dirname(os.path.realpath(__file__)) selfPath = os.path.dirname(os.path.realpath(__file__))
binPath = "" binPath = ""
if ("TDinternal" in selfPath): if ("community" in selfPath):
projPath = selfPath + "/../../../../" projPath = selfPath + "/../../../../"
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 ("community" not in rootRealPath): if ("packaging" not in rootRealPath):
binPath = os.path.join(root, "taosd") binPath = os.path.join(root, "taosd")
break break
else: else:
@ -213,7 +213,7 @@ class TDDnode:
break break
if (binPath == ""): if (binPath == ""):
tdLog.exit("taosd not found!s") tdLog.exit("taosd not found!")
else: else:
tdLog.info("taosd found in %s" % rootRealPath) tdLog.info("taosd found in %s" % rootRealPath)