Author: Mikhail Goncharov Date: 2023-12-08T11:43:14+01:00 New Revision: b43ab182040f7c3b43e37ade7af600af1c9b3dfd
URL: https://github.com/llvm/llvm-project/commit/b43ab182040f7c3b43e37ade7af600af1c9b3dfd DIFF: https://github.com/llvm/llvm-project/commit/b43ab182040f7c3b43e37ade7af600af1c9b3dfd.diff LOG: Reapply "[lldb][test] TestLocationListLookup.py: skip expr check on unsupported platforms (#74818)" This reverts commit e33302fa1279d0a15aac18eca3f0311669bfe328. there is a fix already, sorry for the noise 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