diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-04-11 19:36:53 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-04-11 19:36:53 +0000 |
commit | bb6e3f6be7ede7f4d71d097293b1e7233165faa7 (patch) | |
tree | 5c3b1c8fd42ea08e14b9b749a651142b9da40b4f | |
parent | 586fad50ac47fbb110737ce7ea2f503c609472ab (diff) | |
download | bcm5719-llvm-bb6e3f6be7ede7f4d71d097293b1e7233165faa7.tar.gz bcm5719-llvm-bb6e3f6be7ede7f4d71d097293b1e7233165faa7.zip |
[test] Fix & re-enable CommandScriptImmediateOutputFile on Windows
Apparently the shlex module produces garbage on Windows. I've added a
hand rolled split instead that should suffice for this test.
llvm-svn: 358216
-rw-r--r-- | lldb/lit/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test | 2 | ||||
-rw-r--r-- | lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lldb/lit/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test b/lldb/lit/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test index 5aaaac03793..a653b74200d 100644 --- a/lldb/lit/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test +++ b/lldb/lit/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test @@ -1,5 +1,3 @@ -# UNSUPPORTED: system-windows - # Test that LLDB correctly allows scripted commands to set immediate output to # a file. diff --git a/lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py b/lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py index e0c24055c83..14add9943dc 100644 --- a/lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py +++ b/lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py @@ -1,16 +1,19 @@ from __future__ import print_function import sys -import shlex +def split(command): + command = command.strip() + return command.rsplit(' ', 1) + def command_function(debugger, command, exe_ctx, result, internal_dict): result.SetImmediateOutputFile(sys.__stdout__) print('this is a test string, just a test string', file=result) def write_file(debugger, command, exe_ctx, result, internal_dict): - args = shlex.split(command) + args = split(command) path = args[0] mode = args[1] with open(path, mode) as f: |