Add log_path argument to print_result and print_log_path_and_stats

The result.py print_log_path_and_stats function has
a log_path argument which needed to be added to the
print_result function and function calls in runner.py.

Added log_path argument to print_log_path_and_stats
call in print_reports function to pass to
print_log_path_and_stats function.

Change-Id: I23a2e630bce98b6b51187a81ef00ed057d7d2901
Closes-Bug: 1837378
This commit is contained in:
Brian Tray 2019-11-20 18:20:06 -05:00
parent df49ebf749
commit ab4c446520
2 changed files with 4 additions and 4 deletions

View File

@ -252,10 +252,10 @@ class IssueTestResult(unittest.TextTestResult):
formatter = formatter_types[output_format.lower()]
formatter.report(self.output)
def print_result(self, start_time):
def print_result(self, start_time, log_path):
"""Prints test summary/stats (e.g. # failures) to stdout."""
self.printErrors(CONF.output_format)
self.print_log_path_and_stats(start_time)
self.print_log_path_and_stats(start_time, log_path)
def print_log_path_and_stats(self, start_time, log_path):
"""Print the path to the log folder for this run."""

View File

@ -470,7 +470,7 @@ class Runner(object):
try:
response = input()
if response.lower() == "quit":
result.print_result(cls.start_time)
result.print_result(cls.start_time, cls.log_path)
cleanup.delete_temps()
print(_("Exiting..."))
pool.close()
@ -478,7 +478,7 @@ class Runner(object):
exit(0)
print(_('Resuming...'))
except KeyboardInterrupt:
result.print_result(cls.start_time)
result.print_result(cls.start_time, cls.log_path)
cleanup.delete_temps()
print(_("Exiting..."))
pool.close()