Skip to content

Commit

Permalink
test: set stdin too for pseudo-tty tests
Browse files Browse the repository at this point in the history
Ref: #10037
Ref: #10146
PR-URL: #10149
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
  • Loading branch information
addaleax authored and MylesBorins committed Feb 1, 2017
1 parent 53404db commit 42da81e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,11 +682,12 @@ def Execute(args, context, timeout=None, env={}, faketty=False):
if faketty:
import pty
(out_master, fd_out) = pty.openpty()
fd_err = fd_out
fd_in = fd_err = fd_out
pty_out = out_master
else:
(fd_out, outname) = tempfile.mkstemp()
(fd_err, errname) = tempfile.mkstemp()
fd_in = 0
pty_out = None

# Extend environment
Expand All @@ -698,6 +699,7 @@ def Execute(args, context, timeout=None, env={}, faketty=False):
context,
timeout,
args = args,
stdin = fd_in,
stdout = fd_out,
stderr = fd_err,
env = env_copy,
Expand Down

0 comments on commit 42da81e

Please sign in to comment.