Skip to content

Commit f300e4f

Browse files
committed
Fix TestSessionSave.py; update a comment
1 parent 5cb4ef2 commit f300e4f

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

lldb/include/lldb/Interpreter/CommandInterpreter.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -772,10 +772,12 @@ class CommandInterpreter : public Broadcaster,
772772

773773
StreamString m_transcript_stream;
774774

775-
/// Contains a list of handled commands, output and error. Each element in
776-
/// the list is a dictionary with three keys: "command" (string), "output"
777-
/// (list of strings) and optionally "error" (list of strings). Each string
778-
/// in "output" and "error" is a line (without EOL characters).
775+
/// Contains a list of handled commands and their details. Each element in
776+
/// the list is a dictionary with the following keys/values:
777+
/// - "command" (string): The command that was executed.
778+
/// - "output" (string): The output of the command. Empty ("") if no output.
779+
/// - "error" (string): The error of the command. Empty ("") if no error.
780+
/// - "seconds" (float): The time it took to execute the command.
779781
StructuredData::Array m_transcript;
780782
};
781783

lldb/test/API/commands/session/save/TestSessionSave.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ def test_session_save(self):
2525
raw = ""
2626
interpreter = self.dbg.GetCommandInterpreter()
2727

28+
# Make sure "save-transcript" is on, so that all the following setings
29+
# and commands are saved into the trasncript. Note that this cannot be
30+
# a part of the `settings`, because this command itself won't be saved
31+
# into the transcript.
32+
self.runCmd("settings set interpreter.save-transcript true")
33+
2834
settings = [
2935
"settings set interpreter.echo-commands true",
3036
"settings set interpreter.echo-comment-commands true",
@@ -95,6 +101,12 @@ def test_session_save_on_quit(self):
95101
raw = ""
96102
interpreter = self.dbg.GetCommandInterpreter()
97103

104+
# Make sure "save-transcript" is on, so that all the following setings
105+
# and commands are saved into the trasncript. Note that this cannot be
106+
# a part of the `settings`, because this command itself won't be saved
107+
# into the transcript.
108+
self.runCmd("settings set interpreter.save-transcript true")
109+
98110
td = tempfile.TemporaryDirectory()
99111

100112
settings = [

0 commit comments

Comments
 (0)