Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: systrace/systrace/tracing_agents/ftrace_agent_unittest.py

Issue 2276263003: Pass in custom options to Systrace agents (Closed) Base URL: https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git@master
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « systrace/systrace/tracing_agents/ftrace_agent.py ('k') | systrace/systrace/tracing_controller.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: systrace/systrace/tracing_agents/ftrace_agent_unittest.py
diff --git a/systrace/systrace/tracing_agents/ftrace_agent_unittest.py b/systrace/systrace/tracing_agents/ftrace_agent_unittest.py
index 4a374ebc69ae604429aa18591d90033cf7a35509..fdc54cdaab3022b89fef46cd4979bdfdc10579f5 100755
--- a/systrace/systrace/tracing_agents/ftrace_agent_unittest.py
+++ b/systrace/systrace/tracing_agents/ftrace_agent_unittest.py
@@ -114,11 +114,12 @@ class FtraceAgentTest(unittest.TestCase):
io_interface = make_test_io_interface(permitted_files)
systrace_cmd = SYSTRACE_HOST_CMD_DEFAULT + ["irq"]
options, categories = run_systrace.parse_options(systrace_cmd)
+ options.ftrace_categories = categories
agent = ftrace_agent.FtraceAgent(io_interface)
self.assertEqual(['irq'], agent._avail_categories())
# confirm all the event nodes are turned on during tracing
- agent.StartAgentTracing(options, categories)
+ agent.StartAgentTracing(options)
self.assertEqual(permitted_files[irq_event_path], "1")
self.assertEqual(permitted_files[ipi_event_path], "1")
@@ -133,8 +134,8 @@ class FtraceAgentTest(unittest.TestCase):
systrace_cmd = SYSTRACE_HOST_CMD_DEFAULT + ['-b', '16000']
options, categories = run_systrace.parse_options(systrace_cmd)
agent = ftrace_agent.FtraceAgent()
- agent._options = options
- agent._categories = categories
+ agent._config = options
+ agent._config.atrace_categories = categories
self.assertEqual(agent._get_trace_buffer_size(), 16000)
if __name__ == "__main__":
« no previous file with comments | « systrace/systrace/tracing_agents/ftrace_agent.py ('k') | systrace/systrace/tracing_controller.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698