summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py6
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/custom_command.py4
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbpexpect.py2
3 files changed, 6 insertions, 6 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py b/lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
index 570745edf6f..010dcfaca6d 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
@@ -29,8 +29,8 @@ class CommandScriptImmediateOutputTestCase (PExpectTest):
self.launch(timeout=60)
script = os.path.join(os.getcwd(), 'custom_command.py')
- prompt = "(lldb)"
-
+ prompt = "\(lldb\) "
+
self.sendline('command script import %s' % script, patterns=[prompt])
self.sendline('command script add -f custom_command.command_function mycommand', patterns=[prompt])
self.sendline('mycommand', patterns='this is a test string, just a test string')
@@ -52,7 +52,7 @@ class CommandScriptImmediateOutputTestCase (PExpectTest):
self.sendline('command script add -f custom_command.write_file mywrite', patterns=[prompt])
for path, mode in test_files.iteritems():
- command = 'mywrite ' + path + ' ' + mode
+ command = 'mywrite "' + path + '" ' + mode
self.sendline(command, patterns=[prompt])
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/custom_command.py b/lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/custom_command.py
index 03d688ad967..30a3cfb9093 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/custom_command.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/custom_command.py
@@ -1,16 +1,16 @@
from __future__ import print_function
import sys
+import shlex
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 = command.split(' ')
+ args = shlex.split(command)
path = args[0]
mode = args[1]
-
with open(path, mode) as f:
result.SetImmediateOutputFile(f)
if not mode in ['r']:
diff --git a/lldb/packages/Python/lldbsuite/test/lldbpexpect.py b/lldb/packages/Python/lldbsuite/test/lldbpexpect.py
index 952e78910e0..d37d6fa4f8c 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbpexpect.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbpexpect.py
@@ -32,7 +32,7 @@ else:
def launch(self, timeout=None):
if timeout is None: timeout = 30
logfile = sys.stdout if self.TraceOn() else None
- self.child = pexpect.spawn('%s %s' % (lldbtest_config.lldbExec, self.launchArgs()), logfile=logfile)
+ self.child = pexpect.spawn('%s --no-use-colors %s' % (lldbtest_config.lldbExec, self.launchArgs()), logfile=logfile)
self.child.timeout = timeout
self.timeout = timeout
OpenPOWER on IntegriCloud