[Lldb-commits] [lldb] [lldb] Remove process restart prompt from TestSourceManager (PR #85861)

via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 19 13:22:15 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Alex Langford (bulbazord)

<details>
<summary>Changes</summary>

In TestSourceManager, test_artificial_source_location will give the process restart prompt if you run the test individually. The reason is that we run the process twice: first using a convenience function to run to a specific breakpoint and then again to check for a specific message emitted when you hit the breakpoint. Instead of running twice and making the test difficult to run individually, we can just check for the specific messages using other commands.

---
Full diff: https://github.com/llvm/llvm-project/pull/85861.diff


1 Files Affected:

- (modified) lldb/test/API/source-manager/TestSourceManager.py (+6-6) 


``````````diff
diff --git a/lldb/test/API/source-manager/TestSourceManager.py b/lldb/test/API/source-manager/TestSourceManager.py
index eab8924d108146..896fec24791cd2 100644
--- a/lldb/test/API/source-manager/TestSourceManager.py
+++ b/lldb/test/API/source-manager/TestSourceManager.py
@@ -323,13 +323,13 @@ def test_artificial_source_location(self):
         )
 
         self.expect(
-            "run",
-            RUN_SUCCEEDED,
+            "thread info", substrs=[f"{src_file}:0", "stop reason = breakpoint"]
+        )
+        self.expect(
+            "frame select 0",
             substrs=[
-                "stop reason = breakpoint",
-                "%s:%d" % (src_file, 0),
-                "Note: this address is compiler-generated code in " "function",
-                "that has no source code associated " "with it.",
+                "Note: this address is compiler-generated code in function",
+                "that has no source code associated with it.",
             ],
         )
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/85861


More information about the lldb-commits mailing list