[Lldb-commits] [lldb] Fix flaky TestDAP_console test. (PR #94494)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 10 11:20:42 PDT 2024
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 f26bc5f0c421c7a01a1a611249dd7483b749bab5...ea050132f653a908eeefecd647431a0ed65e2cc0 lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py lldb/test/API/tools/lldb-dap/attach/TestDAP_attach.py lldb/test/API/tools/lldb-dap/commands/TestDAP_commands.py lldb/test/API/tools/lldb-dap/console/TestDAP_console.py lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py 2024-06-10 18:17:24.000000 +0000
+++ packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py 2024-06-10 18:20:19.439593 +0000
@@ -194,11 +194,13 @@
def get_console(self, timeout=0.0):
return self.dap_server.get_output("console", timeout=timeout)
def collect_console(self, timeout_secs, pattern=None):
- return self.dap_server.collect_output("console", timeout_secs=timeout_secs, pattern=pattern)
+ return self.dap_server.collect_output(
+ "console", timeout_secs=timeout_secs, pattern=pattern
+ )
def get_local_as_int(self, name, threadId=None):
value = self.dap_server.get_local_variable_value(name, threadId=threadId)
# 'value' may have the variable value and summary.
# Extract the variable value since summary can have nonnumeric characters.
--- test/API/tools/lldb-dap/console/TestDAP_console.py 2024-06-10 18:17:24.000000 +0000
+++ test/API/tools/lldb-dap/console/TestDAP_console.py 2024-06-10 18:20:19.569320 +0000
@@ -138,11 +138,13 @@
process = get_subprocess(psutil.Process(os.getpid()), process_name)
process.terminate()
process.wait()
# Get the console output
- console_output = self.collect_console(timeout_secs=10.0, pattern="exited with status")
+ console_output = self.collect_console(
+ timeout_secs=10.0, pattern="exited with status"
+ )
# Verify the exit status message is printed.
self.assertIn(
"exited with status = -1 (0xffffffff) debugserver died with signal SIGTERM",
console_output,
@@ -154,11 +156,13 @@
program = self.getBuildArtifact("a.out")
self.build_and_launch(program, commandEscapePrefix="")
self.continue_to_exit()
# Get the console output
- console_output = self.collect_console(timeout_secs=10.0, pattern="exited with status")
+ console_output = self.collect_console(
+ timeout_secs=10.0, pattern="exited with status"
+ )
# Verify the exit status message is printed.
self.assertIn(
"exited with status = 0 (0x00000000)",
console_output,
``````````
</details>
https://github.com/llvm/llvm-project/pull/94494
More information about the lldb-commits
mailing list