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 targos committed Dec 26, 2016
1 parent e60cafd commit e057925
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 @@ -683,11 +683,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 @@ -699,6 +700,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 e057925

Please sign in to comment.