[Lldb-commits] [lldb] [lldb][test] Speed up TestGlobalModuleCache.py (PR #201561)

via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 4 05:20:28 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r origin/main...HEAD lldb/test/API/python_api/global_module_cache/TestGlobalModuleCache.py
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- TestGlobalModuleCache.py	2026-06-04 12:18:25.000000 +0000
+++ TestGlobalModuleCache.py	2026-06-04 12:19:53.975075 +0000
@@ -100,17 +100,13 @@
 
         self.build(dictionary={"C_SOURCES": main_c_path, "EXE": "a.out"})
         error = lldb.SBError()
         if one_debugger:
             if one_target:
-                lldbutil.run_to_breakpoint_do_run(
-                    self, target, bkpt
-                )
+                lldbutil.run_to_breakpoint_do_run(self, target, bkpt)
             else:
-                lldbutil.run_to_source_breakpoint(
-                    self, "// break here", main_filespec
-                )
+                lldbutil.run_to_source_breakpoint(self, "// break here", main_filespec)
         else:
             if one_target:
                 new_debugger = lldb.SBDebugger().Create()
                 new_debugger.SetSelectedPlatform(lldb.selected_platform)
                 new_debugger.SetAsync(False)
@@ -121,13 +117,11 @@
                     lldb.SBDebugger.Destroy(self.dbg)
                     self.dbg = self.old_debugger
                     self.old_debugger = None
 
                 self.addTearDownHook(cleanupDebugger)
-                lldbutil.run_to_source_breakpoint(
-                    self, "// break here", main_filespec
-                )
+                lldbutil.run_to_source_breakpoint(self, "// break here", main_filespec)
 
         # In two-print.c counter will be 2:
         self.check_counter_var("2")
 
         # If we made two targets, destroy the first one, that should free up the

``````````

</details>


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


More information about the lldb-commits mailing list