aboutsummaryrefslogtreecommitdiff
path: root/lldb
diff options
context:
space:
mode:
authorMichael Buch <michaelbuch12@gmail.com>2023-12-08 10:09:38 +0000
committerGitHub <noreply@github.com>2023-12-08 10:09:38 +0000
commit11a7e5781c6363ca3061f57f3aa7e49164673821 (patch)
tree6cc7e21e0d4ddb30701d1235506a3fa8b8ca0484 /lldb
parentb0f560b8ea5782eff83b7646f713405eaafd9c73 (diff)
downloadllvm-11a7e5781c6363ca3061f57f3aa7e49164673821.zip
llvm-11a7e5781c6363ca3061f57f3aa7e49164673821.tar.gz
llvm-11a7e5781c6363ca3061f57f3aa7e49164673821.tar.bz2
[lldb][test] TestLocationListLookup.py: skip expr check on unsupported platforms (#74818)
The `expect_expr` check was introduced in https://github.com/llvm/llvm-project/pull/74772. It is failing on Linux and Windows, so skip this test to unblock the bots
Diffstat (limited to 'lldb')
-rw-r--r--lldb/test/API/functionalities/location-list-lookup/TestLocationListLookup.py27
1 files changed, 20 insertions, 7 deletions
diff --git a/lldb/test/API/functionalities/location-list-lookup/TestLocationListLookup.py b/lldb/test/API/functionalities/location-list-lookup/TestLocationListLookup.py
index 07f306a..ccee3bf 100644
--- a/lldb/test/API/functionalities/location-list-lookup/TestLocationListLookup.py
+++ b/lldb/test/API/functionalities/location-list-lookup/TestLocationListLookup.py
@@ -7,10 +7,7 @@ from lldbsuite.test import lldbutil
class LocationListLookupTestCase(TestBase):
- @skipIf(oslist=["linux"], archs=["arm"])
- def test_loclist(self):
- self.build()
-
+ def launch(self) -> lldb.SBProcess:
exe = self.getBuildArtifact("a.out")
target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
@@ -22,15 +19,31 @@ class LocationListLookupTestCase(TestBase):
self.assertTrue(process.IsValid())
self.assertTrue(process.is_stopped)
+ return process
+
+ def check_local_vars(self, process: lldb.SBProcess, check_expr: bool):
# Find `bar` on the stack, then
# make sure we can read out the local
# variables (with both `frame var` and `expr`)
for f in process.GetSelectedThread().frames:
- if f.GetDisplayFunctionName().startswith("Foo::bar"):
+ frame_name = f.GetDisplayFunctionName()
+ if frame_name is not None and frame_name.startswith("Foo::bar"):
argv = f.GetValueForVariablePath("argv").GetChildAtIndex(0)
strm = lldb.SBStream()
argv.GetDescription(strm)
self.assertNotEqual(strm.GetData().find("a.out"), -1)
- process.GetSelectedThread().SetSelectedFrame(f.idx)
- self.expect_expr("this", result_type="Foo *")
+ if check_expr:
+ process.GetSelectedThread().SetSelectedFrame(f.idx)
+ self.expect_expr("this", result_type="Foo *")
+
+ @skipIf(oslist=["linux"], archs=["arm"])
+ @skipIfDarwin
+ def test_loclist_frame_var(self):
+ self.build()
+ self.check_local_vars(self.launch(), check_expr=False)
+
+ @skipUnlessDarwin
+ def test_loclist_expr(self):
+ self.build()
+ self.check_local_vars(self.launch(), check_expr=True)