summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/symbol/TestMiSymbol.py
diff options
context:
space:
mode:
authorKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
committerKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
commitb9c1b51e45b845debb76d8658edabca70ca56079 (patch)
treedfcb5a13ef2b014202340f47036da383eaee74aa /lldb/packages/Python/lldbsuite/test/tools/lldb-mi/symbol/TestMiSymbol.py
parentd5aa73376966339caad04013510626ec2e42c760 (diff)
downloadbcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.tar.gz
bcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.zip
*** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/tools/lldb-mi/symbol/TestMiSymbol.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/tools/lldb-mi/symbol/TestMiSymbol.py56
1 files changed, 38 insertions, 18 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/symbol/TestMiSymbol.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/symbol/TestMiSymbol.py
index 859c096e336..23374330ba1 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/symbol/TestMiSymbol.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/symbol/TestMiSymbol.py
@@ -5,23 +5,25 @@ Test lldb-mi -symbol-xxx commands.
from __future__ import print_function
-
import lldbmi_testcase
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
+
class MiSymbolTestCase(lldbmi_testcase.MiTestCaseBase):
mydir = TestBase.compute_mydir(__file__)
- @skipIfWindows #llvm.org/pr24452: Get lldb-mi tests working on Windows
- @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races
- @expectedFailureAll(oslist=["linux"], bugnumber="new failure after r256863")
+ @skipIfWindows # llvm.org/pr24452: Get lldb-mi tests working on Windows
+ @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races
+ @expectedFailureAll(
+ oslist=["linux"],
+ bugnumber="new failure after r256863")
def test_lldbmi_symbol_list_lines_file(self):
"""Test that 'lldb-mi --interpreter' works for -symbol-list-lines when file exists."""
- self.spawnLldbMi(args = None)
+ self.spawnLldbMi(args=None)
# Load executable
self.runCmd("-file-exec-and-symbols %s" % self.myexe)
@@ -36,22 +38,31 @@ class MiSymbolTestCase(lldbmi_testcase.MiTestCaseBase):
# Get address of main and its line
self.runCmd("-data-evaluate-expression main")
- self.expect("\^done,value=\"0x[0-9a-f]+ \(a.out`main at main.cpp:[0-9]+\)\"")
+ self.expect(
+ "\^done,value=\"0x[0-9a-f]+ \(a.out`main at main.cpp:[0-9]+\)\"")
addr = int(self.child.after.split("\"")[1].split(" ")[0], 16)
line = line_number('main.cpp', '// FUNC_main')
# Test that -symbol-list-lines works on valid data
self.runCmd("-symbol-list-lines main.cpp")
- self.expect("\^done,lines=\[\{pc=\"0x0*%x\",line=\"%d\"\}(,\{pc=\"0x[0-9a-f]+\",line=\"\d+\"\})+\]" % (addr, line))
+ self.expect(
+ "\^done,lines=\[\{pc=\"0x0*%x\",line=\"%d\"\}(,\{pc=\"0x[0-9a-f]+\",line=\"\d+\"\})+\]" %
+ (addr, line))
# Test that -symbol-list-lines doesn't include lines from other sources
# by checking the first and last line, and making sure the other lines
# are between 30 and 39.
- sline = line_number('symbol_list_lines_inline_test2.cpp', '// FUNC_gfunc2')
- eline = line_number('symbol_list_lines_inline_test2.cpp', '// END_gfunc2')
+ sline = line_number(
+ 'symbol_list_lines_inline_test2.cpp',
+ '// FUNC_gfunc2')
+ eline = line_number(
+ 'symbol_list_lines_inline_test2.cpp',
+ '// END_gfunc2')
self.runCmd("-symbol-list-lines symbol_list_lines_inline_test2.cpp")
- self.expect("\^done,lines=\[\{pc=\"0x[0-9a-f]+\",line=\"%d\"\}(,\{pc=\"0x[0-9a-f]+\",line=\"3\d\"\})*,\{pc=\"0x[0-9a-f]+\",line=\"%d\"\}(,\{pc=\"0x[0-9a-f]+\",line=\"3\d\"\})*\]" % (sline, eline))
- ##FIXME: This doesn't work for symbol_list_lines_inline_test.cpp due to clang bug llvm.org/pr24716 (fixed in newer versions of clang)
+ self.expect(
+ "\^done,lines=\[\{pc=\"0x[0-9a-f]+\",line=\"%d\"\}(,\{pc=\"0x[0-9a-f]+\",line=\"3\d\"\})*,\{pc=\"0x[0-9a-f]+\",line=\"%d\"\}(,\{pc=\"0x[0-9a-f]+\",line=\"3\d\"\})*\]" %
+ (sline, eline))
+ # FIXME: This doesn't work for symbol_list_lines_inline_test.cpp due to clang bug llvm.org/pr24716 (fixed in newer versions of clang)
##sline = line_number('symbol_list_lines_inline_test.cpp', '// FUNC_gfunc')
##eline = line_number('symbol_list_lines_inline_test.cpp', '// STRUCT_s')
##self.runCmd("-symbol-list-lines symbol_list_lines_inline_test.cpp")
@@ -62,22 +73,31 @@ class MiSymbolTestCase(lldbmi_testcase.MiTestCaseBase):
sline = line_number('symbol_list_lines_inline_test.h', '// FUNC_ifunc')
eline = line_number('symbol_list_lines_inline_test.h', '// FUNC_mfunc')
self.runCmd("-symbol-list-lines symbol_list_lines_inline_test.h")
- self.expect("\^done,lines=\[\{pc=\"0x[0-9a-f]+\",line=\"%d\"\}(,\{pc=\"0x[0-9a-f]+\",line=\"\d\"\})*(,\{pc=\"0x[0-9a-f]+\",line=\"1\d\"\})*,\{pc=\"0x[0-9a-f]+\",line=\"%d\"\}(,\{pc=\"0x[0-9a-f]+\",line=\"2\d\"\})*\]" % (sline, eline))
+ self.expect(
+ "\^done,lines=\[\{pc=\"0x[0-9a-f]+\",line=\"%d\"\}(,\{pc=\"0x[0-9a-f]+\",line=\"\d\"\})*(,\{pc=\"0x[0-9a-f]+\",line=\"1\d\"\})*,\{pc=\"0x[0-9a-f]+\",line=\"%d\"\}(,\{pc=\"0x[0-9a-f]+\",line=\"2\d\"\})*\]" %
+ (sline, eline))
# Test that -symbol-list-lines fails when file doesn't exist
self.runCmd("-symbol-list-lines unknown_file")
- self.expect("\^error,message=\"error: No source filenames matched 'unknown_file'\. \"")
+ self.expect(
+ "\^error,message=\"error: No source filenames matched 'unknown_file'\. \"")
- # Test that -symbol-list-lines fails when file is specified using relative path
+ # Test that -symbol-list-lines fails when file is specified using
+ # relative path
self.runCmd("-symbol-list-lines ./main.cpp")
- self.expect("\^error,message=\"error: No source filenames matched '\./main\.cpp'\. \"")
+ self.expect(
+ "\^error,message=\"error: No source filenames matched '\./main\.cpp'\. \"")
- # Test that -symbol-list-lines works when file is specified using absolute path
+ # Test that -symbol-list-lines works when file is specified using
+ # absolute path
import os
path = os.path.join(os.getcwd(), "main.cpp")
self.runCmd("-symbol-list-lines \"%s\"" % path)
- self.expect("\^done,lines=\[\{pc=\"0x0*%x\",line=\"%d\"\}(,\{pc=\"0x[0-9a-f]+\",line=\"\d+\"\})+\]" % (addr, line))
+ self.expect(
+ "\^done,lines=\[\{pc=\"0x0*%x\",line=\"%d\"\}(,\{pc=\"0x[0-9a-f]+\",line=\"\d+\"\})+\]" %
+ (addr, line))
# Test that -symbol-list-lines fails when file doesn't exist
self.runCmd("-symbol-list-lines unknown_dir/main.cpp")
- self.expect("\^error,message=\"error: No source filenames matched 'unknown_dir/main\.cpp'\. \"")
+ self.expect(
+ "\^error,message=\"error: No source filenames matched 'unknown_dir/main\.cpp'\. \"")
OpenPOWER on IntegriCloud