Author: Michael Buch Date: 2023-12-08T10:09:38Z New Revision: 11a7e5781c6363ca3061f57f3aa7e49164673821
URL: https://github.com/llvm/llvm-project/commit/11a7e5781c6363ca3061f57f3aa7e49164673821 DIFF: https://github.com/llvm/llvm-project/commit/11a7e5781c6363ca3061f57f3aa7e49164673821.diff LOG: [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 Added: Modified: lldb/test/API/functionalities/location-list-lookup/TestLocationListLookup.py Removed: ################################################################################ diff --git a/lldb/test/API/functionalities/location-list-lookup/TestLocationListLookup.py b/lldb/test/API/functionalities/location-list-lookup/TestLocationListLookup.py index 07f306a6ed78b..ccee3bfde3f5d 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 @@ 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 @@ def test_loclist(self): 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) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits