Files
llvm/lldb/test/API/commands/trace/TestTraceDumpFunctionCalls.py
Walter Erquinigo 566146c03b [lldb][trace] Add a basic function call dumpdump [1] - Add the command scaffolding
The command is thread trace dump function-calls and as minimum will
require printing to a file in json and non-json format

I added a test

Differential Revision: https://reviews.llvm.org/D135521
2022-10-18 13:57:52 -07:00

18 lines
724 B
Python

from intelpt_testcase import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test.decorators import *
class TestTraceDumpInfo(TraceIntelPTTestCaseBase):
def testDumpFunctionCalls(self):
self.expect("trace load -v " +
os.path.join(self.getSourceDir(), "intelpt-trace", "trace.json"))
self.expect("thread trace dump function-calls 2",
error=True, substrs=['error: no thread with index: "2"'])
self.expect("thread trace dump function-calls 1 -j",
substrs=['json = true, pretty_json = false, file = false, thread = 3842849'])
self.expect("thread trace dump function-calls 1 -F /tmp -J",
substrs=['false, pretty_json = true, file = true, thread = 3842849'])