fix: add exeNoWait
This commit is contained in:
parent
90b69d86ea
commit
5e47bc8e3a
|
@ -72,15 +72,14 @@ class TDTestCase(TBase):
|
||||||
# stop taosd
|
# stop taosd
|
||||||
sc.dnodeStop(idx)
|
sc.dnodeStop(idx)
|
||||||
# other
|
# other
|
||||||
etool.exeBinFile("taosd", f"-dm -c {cfg}")
|
etool.exeBinFile("taosd", f"-dm -c {cfg}", False)
|
||||||
sc.dnodeStop(idx)
|
sc.dnodeStop(idx)
|
||||||
etool.exeBinFile("taosd", "-a http://192.168.1.10")
|
etool.exeBinFile("taosd", "-a http://192.168.1.10")
|
||||||
|
|
||||||
#exe
|
#exe
|
||||||
etool.exeBinFile("taosd", f"-E abc -c {cfg}")
|
etool.exeBinFile("taosd", f"-E abc -c {cfg}", False)
|
||||||
sc.dnodeStop(idx)
|
sc.dnodeStop(idx)
|
||||||
etool.exeBinFile("taosd", f"-e def -c {cfg}")
|
etool.exeBinFile("taosd", f"-e def -c {cfg}", False)
|
||||||
|
|
||||||
|
|
||||||
# run
|
# run
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
|
@ -57,8 +57,11 @@ def exe(file):
|
||||||
|
|
||||||
# execute file and return immediately
|
# execute file and return immediately
|
||||||
def exeNoWait(file):
|
def exeNoWait(file):
|
||||||
print("exe no wait")
|
if isWin():
|
||||||
|
cmd = f"mintty -h never {file}"
|
||||||
|
else:
|
||||||
|
cmd = f"nohup {file} > /dev/null 2>&1 & "
|
||||||
|
return exe(file)
|
||||||
|
|
||||||
# run return output and error
|
# run return output and error
|
||||||
def run(command, timeout = 10):
|
def run(command, timeout = 10):
|
||||||
|
|
|
@ -55,9 +55,12 @@ def runBinFile(fname, command):
|
||||||
return frame.eos.runRetList(f"{binFile} {command}")
|
return frame.eos.runRetList(f"{binFile} {command}")
|
||||||
|
|
||||||
# exe build/bin file
|
# exe build/bin file
|
||||||
def exeBinFile(fname, command):
|
def exeBinFile(fname, command, wait=True):
|
||||||
binFile = frame.epath.binFile(fname)
|
binFile = frame.epath.binFile(fname)
|
||||||
if frame.eos.isWin():
|
if frame.eos.isWin():
|
||||||
binFile += ".exe"
|
binFile += ".exe"
|
||||||
|
|
||||||
return frame.eos.exe(f"{binFile} {command}")
|
if wait:
|
||||||
|
return frame.eos.exe(f"{binFile} {command}")
|
||||||
|
else:
|
||||||
|
return frame.eos.exeNoWait(f"{binFile} {command}")
|
Loading…
Reference in New Issue