[Lldb-commits] [lldb] d5fe431 - [lldb][test] Don't hardcode line numbers in DAP_breakpointLocations (#201820)

via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 8 02:38:56 PDT 2026


Author: Raphael Isemann
Date: 2026-06-08T10:38:51+01:00
New Revision: d5fe431c28085692bcb37620cc351e8c84435e0e

URL: https://github.com/llvm/llvm-project/commit/d5fe431c28085692bcb37620cc351e8c84435e0e
DIFF: https://github.com/llvm/llvm-project/commit/d5fe431c28085692bcb37620cc351e8c84435e0e.diff

LOG: [lldb][test] Don't hardcode line numbers in DAP_breakpointLocations (#201820)

Otherwise the test needs to be adjusted for every minor format change.

Added: 
    

Modified: 
    lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_breakpointLocations.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_breakpointLocations.py b/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_breakpointLocations.py
index 37e7d2ad907f0..1fe5f8b9e2adc 100644
--- a/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_breakpointLocations.py
+++ b/lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_breakpointLocations.py
@@ -76,14 +76,14 @@ def test_column_breakpoints(self):
         self.maxDiff = None
         self.assertTrue(response["success"])
         # On some systems, there is an additional breakpoint available
-        # at line 41, column 3, i.e. at the end of the loop. To make this
-        # test more portable, only check that all expected breakpoints are
-        # presented, but also accept additional breakpoints.
+        # at loop_line + 1, column 3, i.e. at the end of the loop. To make
+        # this test more portable, only check that all expected breakpoints
+        # are presented, but also accept additional breakpoints.
         expected_breakpoints = [
-            {"column": 39, "line": 41},
-            {"column": 51, "line": 41},
-            {"column": 3, "line": 43},
-            {"column": 18, "line": 43},
+            {"column": 39, "line": loop_line},
+            {"column": 51, "line": loop_line},
+            {"column": 3, "line": loop_line + 2},
+            {"column": 18, "line": loop_line + 2},
         ]
         for bp in expected_breakpoints:
             self.assertIn(bp, response["body"]["breakpoints"])


        


More information about the lldb-commits mailing list