def test_merge_logger(self): proc_ps_path = os.path.join(os.path.dirname(sys.argv[0]), 'test_data/process_tree/proc_ps.log') trace = self.trace writer = self.writer parsing.parse_file(writer, trace, proc_ps_path) trace.compile(writer) processtree = process_tree.ProcessTree(writer, None, trace.ps_stats, \ trace.ps_stats.sample_period, None, False, None, None, False, for_testing=True) removed = processtree.merge_logger(processtree.process_tree, 'bootchartd', None, False) self.assertNotEqual(removed, 0)
def setUp(self): self.name = "Process tree unittest" self.rootdir = os.path.join(os.path.dirname(sys.argv[0]), '../../examples/1/') parser = main._mk_options_parser() options, args = parser.parse_args(['--q', self.rootdir]) writer = main._mk_writer(options) trace = parsing.Trace(writer, args, options) parsing.parse_file(writer, trace, self.mk_fname('proc_ps.log')) trace.compile(writer) self.processtree = process_tree.ProcessTree(writer, None, trace.ps_stats, \ trace.ps_stats.sample_period, None, options.prune, None, None, False, for_testing = True)