[Lldb-commits] [lldb] [lldb][test] Don't hardcode line numbers in DAP_breakpointLocations (PR #201820)
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 5 05:01:42 PDT 2026
https://github.com/Teemperor created https://github.com/llvm/llvm-project/pull/201820
Otherwise the test needs to be adjusted for every minor format change.
>From 7877aa834c708e3e3dd315f678032ab09d0da57e Mon Sep 17 00:00:00 2001
From: Raphael Isemann <rise at apple.com>
Date: Fri, 5 Jun 2026 10:18:45 +0100
Subject: [PATCH] [lldb][test] Don't hardcode line numbers in
DAP_breakpointLocations
Otherwise the test needs to be adjusted for every minor format change.
---
.../breakpoint/TestDAP_breakpointLocations.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
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