From 38ad6b820672abcec0f894dd667466950d3f438a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= Date: Mon, 22 Feb 2016 13:17:19 +0100 Subject: [PATCH] avocado: Rename start_file_logging to start_job_logging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "start_file_logging" is used when job results are created to add job file-handlers to logging. Signed-off-by: Lukáš Doktor --- avocado/core/job.py | 10 +++++----- avocado/core/output.py | 4 ++-- selftests/unit/test_jsonresult.py | 4 ++-- selftests/unit/test_xunit.py | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/avocado/core/job.py b/avocado/core/job.py index 3d2384ec..ed4b3eb5 100644 --- a/avocado/core/job.py +++ b/avocado/core/job.py @@ -405,10 +405,10 @@ class Job(object): that configure a job failure. """ self._setup_job_results() - self.view.start_file_logging(self.logfile, - self.loglevel, - self.unique_id, - self.replay_sourcejob) + self.view.start_job_logging(self.logfile, + self.loglevel, + self.unique_id, + self.replay_sourcejob) try: test_suite = self._make_test_suite(self.urls) except loader.LoaderError, details: @@ -445,7 +445,7 @@ class Job(object): failures = self.test_runner.run_suite(test_suite, mux, timeout=self.timeout, replay_map=replay_map) - self.view.stop_file_logging() + self.view.stop_job_logging() # If it's all good so far, set job status to 'PASS' if self.status == 'RUNNING': self.status = 'PASS' diff --git a/avocado/core/output.py b/avocado/core/output.py index 26cbe1ac..f217d32a 100644 --- a/avocado/core/output.py +++ b/avocado/core/output.py @@ -547,7 +547,7 @@ class View(object): """ self._log_ui_info(term_support.warn_header_str(msg), skip_newline) - def start_file_logging(self, logfile, loglevel, unique_id, sourcejob=None): + def start_job_logging(self, logfile, loglevel, unique_id, sourcejob=None): """ Start the main file logging. @@ -573,7 +573,7 @@ class View(object): root_logger.setLevel(loglevel) self.replay_sourcejob = sourcejob - def stop_file_logging(self): + def stop_job_logging(self): """ Simple helper for removing a handler from the current logger. """ diff --git a/selftests/unit/test_jsonresult.py b/selftests/unit/test_jsonresult.py index e4d57dc1..899ba61f 100644 --- a/selftests/unit/test_jsonresult.py +++ b/selftests/unit/test_jsonresult.py @@ -12,10 +12,10 @@ from avocado.core import job class _Stream(object): - def start_file_logging(self, param1, param2): + def start_job_logging(self, param1, param2): pass - def stop_file_logging(self): + def stop_job_logging(self): pass def set_tests_info(self, info): diff --git a/selftests/unit/test_xunit.py b/selftests/unit/test_xunit.py index cfa434d2..83400e1f 100644 --- a/selftests/unit/test_xunit.py +++ b/selftests/unit/test_xunit.py @@ -16,10 +16,10 @@ class ParseXMLError(Exception): class _Stream(object): - def start_file_logging(self, param1, param2): + def start_job_logging(self, param1, param2): pass - def stop_file_logging(self): + def stop_job_logging(self): pass def set_tests_info(self, info): -- GitLab