aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/API/python_api
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2020-10-22 15:31:34 +0200
committerRaphael Isemann <teemperor@gmail.com>2020-10-22 16:41:54 +0200
commit30d5590d171c40e05b65585d1b531d8489e783e2 (patch)
treeb705ddecb0ade1f59f6f19c3701ba57bfdf36990 /lldb/test/API/python_api
parentd5c05616679894b3eb99194f1a3ffeef07c5cb19 (diff)
downloadllvm-30d5590d171c40e05b65585d1b531d8489e783e2.zip
llvm-30d5590d171c40e05b65585d1b531d8489e783e2.tar.gz
llvm-30d5590d171c40e05b65585d1b531d8489e783e2.tar.bz2
[lldb] Fix TestTargetAPI.py on Apple simulators
This test checks that the output of `SBTarget.GetDescription()` contains the substrings `'a.out', 'Target', 'Module', 'Breakpoint'` in that order. This test is currently failing on Apple simulators as apparently 'Module' can't be found in the output after 'Target". The reason for that is that the actual output of `SBTarget.GetDescription()` looks like this: ``` Target Module /build/path/lldb-test-build.noindex/python_api/target/TestTargetAPI.test_get_description_dwarf/a.out 0x7ff2b6d3f990: ObjectFileMachO64, file = /build/path/lldb-test-build.noindex/python_api/target/TestTargetAPI.test_get_description [...] 0x7ff307150000: BreakpointList with 0 Breakpoints: <LLDB module output repeats for each loaded module> ``` Clearly the string order should be `'Target', 'Module', 'a.out', 'Breakpoint'`. However, LLDB is also a bunch of system shared libraries (libxpc.dylib, libobjc.A.dylib, etc.) when *not* running against a simulator, we end up unintentionally finding the `'Target', 'Module', 'Breakpoint'` substrings in the trailing descriptions of the system modules. When running against a simulator we however don't load shared system libraries. This patch just moves the substrings in the correct order to make this test pass without having any shared library modules in the description output. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D89698
Diffstat (limited to 'lldb/test/API/python_api')
-rw-r--r--lldb/test/API/python_api/target/TestTargetAPI.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/test/API/python_api/target/TestTargetAPI.py b/lldb/test/API/python_api/target/TestTargetAPI.py
index a4d3aea..0f5fe80 100644
--- a/lldb/test/API/python_api/target/TestTargetAPI.py
+++ b/lldb/test/API/python_api/target/TestTargetAPI.py
@@ -331,7 +331,7 @@ class TargetAPITestCase(TestBase):
if not desc:
self.fail("SBTarget.GetDescription() failed")
self.expect(desc, exe=False,
- substrs=['a.out', 'Target', 'Module', 'Breakpoint'])
+ substrs=['Target', 'Module', 'a.out', 'Breakpoint'])
@not_remote_testsuite_ready
@add_test_categories(['pyapi'])