mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 544128: windows compatibility for shell JSTest harness, r=dvander
This commit is contained in:
parent
61112f8395
commit
7696840b5d
@ -70,9 +70,9 @@ class XULInfoTester:
|
||||
cmd = [ self.js_bin, '-e', self.js_prolog, '-e', 'print(!!(%s))'%cond ]
|
||||
p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE)
|
||||
out, err = p.communicate()
|
||||
if out == 'true\n':
|
||||
if out in ('true\n', 'true\r\n'):
|
||||
ans = True
|
||||
elif out == 'false\n':
|
||||
elif out in ('false\n', 'false\r\n'):
|
||||
ans = False
|
||||
else:
|
||||
raise Exception("Failed to test XUL condition '%s'"%cond)
|
||||
|
@ -14,7 +14,9 @@ def do_run_cmd(cmd):
|
||||
|
||||
def th_run_cmd(cmd, l):
|
||||
t0 = datetime.datetime.now()
|
||||
p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
|
||||
# close_fds is not supported on Windows and will cause a ValueError.
|
||||
close_fds = sys.platform != 'win32'
|
||||
p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=close_fds)
|
||||
l[0] = p
|
||||
out, err = p.communicate()
|
||||
t1 = datetime.datetime.now()
|
||||
|
Loading…
Reference in New Issue
Block a user