From ff445c2e489654e97b35dc8b082a4cd45df7c191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Pag=C3=A8s?= Date: Sat, 15 Nov 2014 12:48:50 +0100 Subject: [PATCH] make tested processes output log with debug level --- mozregression/inboundfinder.py | 2 +- mozregression/regression.py | 2 +- mozregression/runinbound.py | 4 +++- mozregression/runnightly.py | 11 +++++++---- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/mozregression/inboundfinder.py b/mozregression/inboundfinder.py index feaa43c0..32c6744d 100644 --- a/mozregression/inboundfinder.py +++ b/mozregression/inboundfinder.py @@ -61,7 +61,7 @@ class InboundBuildData(object): self._cache = cache self.raw_revisions = raw_revisions self.half_window_range = half_window_range - self._logger = get_default_logger('mozregression') + self._logger = get_default_logger('Inbound Build Finder') def __len__(self): return len(self._cache) diff --git a/mozregression/regression.py b/mozregression/regression.py index cddb8787..02596bd0 100755 --- a/mozregression/regression.py +++ b/mozregression/regression.py @@ -36,7 +36,7 @@ class Bisector(object): self.appname = appname self.last_good_revision = last_good_revision self.first_bad_revision = first_bad_revision - self._logger = get_default_logger('mozregression') + self._logger = get_default_logger('Bisector') def find_regression_chset(self, last_good_revision, first_bad_revision): # Uses mozcommitbuilder to bisect on changesets diff --git a/mozregression/runinbound.py b/mozregression/runinbound.py index 29a8d114..317836dd 100644 --- a/mozregression/runinbound.py +++ b/mozregression/runinbound.py @@ -20,6 +20,7 @@ class FirefoxInbound(FirefoxNightly): self.bits = bits self.inbound_branch = inbound_branch self.build_finder = FirefoxBuildsFinder(bits=bits, inbound_branch=inbound_branch) + self._logger = get_default_logger('Regression Runner') def get_build_url(self, timestamp): base_url = "%s%s/" % (self.build_finder.build_base_url, timestamp) @@ -40,6 +41,7 @@ class FennecInbound(FennecNightly): self.persist = persist self.inbound_branch = inbound_branch self.build_finder = FennecBuildsFinder(inbound_branch=inbound_branch) + self._logger = get_default_logger('Regression Runner') def get_build_url(self, timestamp): base_url = "%s%s/" % (self.build_finder.build_base_url, timestamp) @@ -94,7 +96,7 @@ class InboundRunner(NightlyRunner): self.persist = persist self.inbound_branch = inbound_branch self.cmdargs = list(cmdargs) - self._logger = get_default_logger('mozregression') + self._logger = get_default_logger('Regression Runner') def print_resume_info(self, last_good_revision, first_bad_revision): self._logger.info('mozregression --good-rev=%s --bad-rev=%s%s' diff --git a/mozregression/runnightly.py b/mozregression/runnightly.py index 641c880c..d04f1672 100755 --- a/mozregression/runnightly.py +++ b/mozregression/runnightly.py @@ -67,7 +67,7 @@ class Nightly(object): self.build_regex = self._get_build_regex(self.name, bits) + "$" self.build_info_regex = \ self._get_build_regex(self.name, bits, with_ext=False) + "\.txt$" - self._logger = get_default_logger('mozregression') + self._logger = get_default_logger('Regression Runner') def get_inbound_branch(self, date): raise NotImplementedError @@ -193,8 +193,11 @@ class Nightly(object): else: profile = self.profile_class() - self.runner = Runner(binary=self.binary, cmdargs=cmdargs, - profile=profile) + process_args = {'processOutputLine': [self._logger.debug]} + self.runner = Runner(binary=self.binary, + cmdargs=cmdargs, + profile=profile, + process_args=process_args) self.runner.start() return True @@ -315,7 +318,7 @@ class NightlyRunner(object): self.persist = persist self.cmdargs = list(cmdargs) self.inbound_branch = inbound_branch - self._logger = get_default_logger('mozregression') + self._logger = get_default_logger('Regression Runner') def install(self, date=datetime.date.today()): if not self.app.download(date=date):