[PATCH] D16000: Add "/dev/console" as a special file name to lit
Yunzhong Gao via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 22 18:12:02 PST 2016
ygao updated this revision to Diff 45785.
ygao marked 2 inline comments as done.
ygao added a comment.
@delcypher,
Thanks a lot! The lit parameter "-param enable_console=1" works for me and it is much cleaner than what I had earlier. I took out those changes.
The change to lit.cfg to use the lit parameter is relevant to the cfe project and I am updating the related diff http://reviews.llvm.org/D15705.
http://reviews.llvm.org/D16000
Files:
utils/lit/lit/TestRunner.py
Index: utils/lit/lit/TestRunner.py
===================================================================
--- utils/lit/lit/TestRunner.py
+++ utils/lit/lit/TestRunner.py
@@ -245,6 +245,10 @@
if r[2] is None:
if kAvoidDevNull and r[0] == '/dev/null':
r[2] = tempfile.TemporaryFile(mode=r[1])
+ elif kIsWindows and r[0] == '/dev/tty':
+ # Simulate /dev/tty on Windows.
+ # "CON" is a special filename for the console.
+ r[2] = open("CON", r[1])
else:
# Make sure relative paths are relative to the cwd.
redir_filename = os.path.join(cmd_shenv.cwd, r[0])
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16000.45785.patch
Type: text/x-patch
Size: 771 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160123/ae4805ca/attachment-0001.bin>
More information about the llvm-commits
mailing list