diff options
author | Jim Ingham <jingham@apple.com> | 2023-07-07 19:08:10 -0700 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2023-07-07 19:09:18 -0700 |
commit | 01e3393b94d194ee99e57f23f9c08160cef94753 (patch) | |
tree | 116f6f980bb24d1c224b304cbdd2ea1f991e27f3 /lldb/packages/Python/lldbsuite | |
parent | 6c47654efd36dd8fdbf089b485a1c594a354e421 (diff) | |
download | llvm-01e3393b94d194ee99e57f23f9c08160cef94753.zip llvm-01e3393b94d194ee99e57f23f9c08160cef94753.tar.gz llvm-01e3393b94d194ee99e57f23f9c08160cef94753.tar.bz2 |
Split up the runCmd trace printing to print the command before running.
That way if the command crashes you still know what it was.
Differential Revision: https://reviews.llvm.org/D154752
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbtest.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index 2bff1a7..0225571 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -2059,12 +2059,14 @@ class TestBase(Base, metaclass=LLDBTestCaseFactory): running = cmd.startswith("run") or cmd.startswith("process launch") for i in range(self.maxLaunchCount if running else 1): - self.ci.HandleCommand(cmd, self.res, inHistory) - with recording(self, trace) as sbuf: print("runCmd:", cmd, file=sbuf) if not check: print("check of return status not required", file=sbuf) + + self.ci.HandleCommand(cmd, self.res, inHistory) + + with recording(self, trace) as sbuf: if self.res.Succeeded(): print("output:", self.res.GetOutput(), file=sbuf) else: |