test: add stream cases
This commit is contained in:
parent
10cd04349d
commit
e073e1c1ae
|
@ -824,23 +824,22 @@ class TDCom:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def get_path(tool="taosd"):
|
def get_path(tool="taosd"):
|
||||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
if ("community" in selfPath):
|
||||||
|
projPath = selfPath[:selfPath.find("community")]
|
||||||
|
else:
|
||||||
|
projPath = selfPath[:selfPath.find("tests")]
|
||||||
|
|
||||||
if ("community" in selfPath):
|
paths = []
|
||||||
projPath = selfPath[:selfPath.find("community")]
|
for root, dirs, files in os.walk(projPath):
|
||||||
else:
|
if ((tool) in files or ("%s.exe"%tool) in files):
|
||||||
projPath = selfPath[:selfPath.find("tests")]
|
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||||
|
if ("packaging" not in rootRealPath):
|
||||||
paths = []
|
paths.append(os.path.join(root, tool))
|
||||||
for root, dirs, files in os.walk(projPath):
|
break
|
||||||
if ((tool) in files or ("%s.exe"%tool) in files):
|
if (len(paths) == 0):
|
||||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
return ""
|
||||||
if ("packaging" not in rootRealPath):
|
return paths[0]
|
||||||
paths.append(os.path.join(root, tool))
|
|
||||||
break
|
|
||||||
if (len(paths) == 0):
|
|
||||||
return ""
|
|
||||||
return paths[0]
|
|
||||||
|
|
||||||
def dict2toml(in_dict: dict, file:str):
|
def dict2toml(in_dict: dict, file:str):
|
||||||
if not isinstance(in_dict, dict):
|
if not isinstance(in_dict, dict):
|
||||||
|
|
Loading…
Reference in New Issue