autotest: fixed run_in_terminal_window() on Linux

try to retain MacOS functionality too
This commit is contained in:
Andrew Tridgell 2016-07-08 08:20:20 +10:00
parent efb6b4c57e
commit 1a3b292aa3

View File

@ -602,12 +602,14 @@ def run_in_terminal_window(autotest, name, cmd):
runme.extend(cmd)
progress_cmd("Run " + name, runme)
# bg this explicitly?!
out = subprocess.Popen(runme,stdout=subprocess.PIPE).communicate()[0]
if under_macos():
# on MacOS record the window IDs so we can close them later
out = subprocess.Popen(runme,stdout=subprocess.PIPE).communicate()[0]
import re
p = re.compile('tab 1 of window id (.*)')
windowID.append(p.findall(out)[0])
else:
p = subprocess.Popen(runme)
tracker_uarta = None # blemish