Beispiel #1
0
 def test_trace_error_stop_tracing(self):
     setup_battor_test(StartShell_error=False,
                       StartTracing_error=False,
                       StopTracing_error=True,
                       CollectTraceData_error=False)
     agent = battor_trace_agent.BattorTraceAgent()
     agent.StartAgentTracing(OPTIONS, CATEGORIES)
     self.assertRaises(RuntimeError, agent.StopAgentTracing)
Beispiel #2
0
 def test_trace_double_start(self):
     setup_battor_test(StartShell_error=False,
                       StartTracing_error=False,
                       StopTracing_error=False,
                       CollectTraceData_error=False)
     agent = battor_trace_agent.BattorTraceAgent()
     agent.StartAgentTracing(OPTIONS, CATEGORIES)
     self.assertRaises(AssertionError,
                       lambda: agent.StartAgentTracing(OPTIONS, CATEGORIES))
Beispiel #3
0
 def test_trace_complete(self):
     setup_battor_test(StartShell_error=False,
                       StartTracing_error=False,
                       StopTracing_error=False,
                       CollectTraceData_error=False)
     agent = battor_trace_agent.BattorTraceAgent()
     agent.StartAgentTracing(OPTIONS, CATEGORIES)
     agent.StopAgentTracing()
     x = agent.GetResults()
     self.assertEqual(x.raw_data, 'traceout1\ntraceout2')