fix: add exeNoWait
This commit is contained in:
parent
90b69d86ea
commit
5e47bc8e3a
|
@ -72,15 +72,14 @@ class TDTestCase(TBase):
|
|||
# stop taosd
|
||||
sc.dnodeStop(idx)
|
||||
# other
|
||||
etool.exeBinFile("taosd", f"-dm -c {cfg}")
|
||||
etool.exeBinFile("taosd", f"-dm -c {cfg}", False)
|
||||
sc.dnodeStop(idx)
|
||||
etool.exeBinFile("taosd", "-a http://192.168.1.10")
|
||||
|
||||
#exe
|
||||
etool.exeBinFile("taosd", f"-E abc -c {cfg}")
|
||||
etool.exeBinFile("taosd", f"-E abc -c {cfg}", False)
|
||||
sc.dnodeStop(idx)
|
||||
etool.exeBinFile("taosd", f"-e def -c {cfg}")
|
||||
|
||||
etool.exeBinFile("taosd", f"-e def -c {cfg}", False)
|
||||
|
||||
# run
|
||||
def run(self):
|
||||
|
|
|
@ -57,8 +57,11 @@ def exe(file):
|
|||
|
||||
# execute file and return immediately
|
||||
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
|
||||
def run(command, timeout = 10):
|
||||
|
|
|
@ -55,9 +55,12 @@ def runBinFile(fname, command):
|
|||
return frame.eos.runRetList(f"{binFile} {command}")
|
||||
|
||||
# exe build/bin file
|
||||
def exeBinFile(fname, command):
|
||||
def exeBinFile(fname, command, wait=True):
|
||||
binFile = frame.epath.binFile(fname)
|
||||
if frame.eos.isWin():
|
||||
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