diff options
| author | Siva Chandra <sivachandra@google.com> | 2015-10-23 21:38:04 +0000 |
|---|---|---|
| committer | Siva Chandra <sivachandra@google.com> | 2015-10-23 21:38:04 +0000 |
| commit | 671dadd8f63f1285452d986fdaec02b57b627f73 (patch) | |
| tree | 513d2f81406989985cdbb68f05c0aa7faee20579 /lldb/test/functionalities | |
| parent | 7009cd35549c753722bebe57378f566388032fba (diff) | |
| download | bcm5719-llvm-671dadd8f63f1285452d986fdaec02b57b627f73.tar.gz bcm5719-llvm-671dadd8f63f1285452d986fdaec02b57b627f73.zip | |
[TestBreakpointCommand] Fix after r251121
Summary:
"from __future__ import print_function" was added to the test file but
not to the embedded interpreter. This change uses file.write instead to
avoid all problems with print.
Reviewers: zturner
Subscribers: zturner, lldb-commits
Differential Revision: http://reviews.llvm.org/D14029
llvm-svn: 251150
Diffstat (limited to 'lldb/test/functionalities')
| -rw-r--r-- | lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py index 051063bf4ec..320a6113b5c 100644 --- a/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py +++ b/lldb/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py @@ -52,7 +52,7 @@ class BreakpointCommandTestCase(TestBase): # Now add callbacks for the breakpoints just created. self.runCmd("breakpoint command add -s command -o 'frame variable --show-types --scope' 1 4") - self.runCmd("breakpoint command add -s python -o 'here = open(\"output.txt\", \"w\"); print(\"lldb\", file=here); here.close()' 2") + self.runCmd("breakpoint command add -s python -o 'here = open(\"output.txt\", \"w\"); here.write(\"lldb\\n\"); here.close()' 2") self.runCmd("breakpoint command add --python-function bktptcmd.function 3") # Check that the breakpoint commands are correctly set. @@ -74,7 +74,7 @@ class BreakpointCommandTestCase(TestBase): self.expect("breakpoint command list 2", "Breakpoint 2 command ok", substrs = ["Breakpoint commands:", "here = open", - "print(file=here)", + "here.write", "here.close()"]) self.expect("breakpoint command list 3", "Breakpoint 3 command ok", substrs = ["Breakpoint commands:", @@ -178,7 +178,7 @@ class BreakpointCommandTestCase(TestBase): lldbutil.run_break_set_by_file_and_line (self, "main.c", self.line, num_expected_locations=1, loc_exact=True) # Now add callbacks for the breakpoints just created. - self.runCmd("breakpoint command add -s python -o 'here = open(\"output-2.txt\", \"w\"); print(frame, file=here); print(bp_loc, file=here); here.close()' 1") + self.runCmd("breakpoint command add -s python -o 'here = open(\"output-2.txt\", \"w\"); here.write(str(frame) + \"\\n\"); here.write(str(bp_loc) + \"\\n\"); here.close()' 1") # Remove 'output-2.txt' if it already exists. |

