Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: set stdin too for pseudo-tty tests
Ref: #10037
Ref: #10146
  • Loading branch information
addaleax committed Dec 9, 2016
commit e5ae21bea9dba028c25cbe0f4b52636ce0921cff
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