test:kill tmq_sim process when start cases in windows

This commit is contained in:
chenhaoran 2023-08-22 09:15:29 +08:00
parent b1e91b554f
commit 63d186afa1
1 changed files with 1 additions and 1 deletions

View File

@ -812,7 +812,7 @@ class TDDnodes:
time.sleep(1) time.sleep(1)
processID = subprocess.check_output( processID = subprocess.check_output(
psCmd, shell=True).decode("utf-8").strip() psCmd, shell=True).decode("utf-8").strip()
psCmd = "for /f %a in ('wmic process where \"name='tmq_sim'\" get processId ^| xargs echo ^| awk '{print $2}' ^&^& echo aa') do @(ps | grep %a | awk '{print $1}' | xargs)" psCmd = "for /f %a in ('wmic process where \"name='tmq_simm.exe'\" get processId ^| xargs echo ^| awk '{print $2}' ^&^& echo aa') do @(ps | grep %a | awk '{print $1}' | xargs)"
processID = subprocess.check_output(psCmd, shell=True).decode("utf-8").strip() processID = subprocess.check_output(psCmd, shell=True).decode("utf-8").strip()
while(processID): while(processID):
print(processID) print(processID)