def __init__(self, run_tracker, settings): Reporter.__init__(self, run_tracker, settings) # The main report, and associated tool outputs, go under this dir. self._html_dir = settings.html_dir # We render HTML from mustache templates. self._renderer = MustacheRenderer(settings.template_dir, __name__) # We serve files relative to the build root. self._buildroot = get_buildroot() self._html_path_base = os.path.relpath(self._html_dir, self._buildroot) # We write the main report body to this file object. self._report_file = None # We redirect stdout, stderr etc. of tool invocations to these files. self._output_files = defaultdict(dict) # workunit_id -> {path -> fileobj}.
def __init__(self, run_tracker, settings): Reporter.__init__(self, run_tracker, settings) for key, value in settings.label_format.items(): if key not in WorkUnitLabel.keys(): self.emit('*** Got invalid key {} for --reporting-console-label-format. Expected one of {}\n' .format(key, WorkUnitLabel.keys())) if value not in LabelFormat.keys(): self.emit('*** Got invalid value {} for --reporting-console-label-format. Expected one of {}\n' .format(value, LabelFormat.keys())) for key, value in settings.tool_output_format.items(): if key not in WorkUnitLabel.keys(): self.emit('*** Got invalid key {} for --reporting-console-tool-output-format. Expected one of {}\n' .format(key, WorkUnitLabel.keys())) if value not in ToolOutputFormat.keys(): self.emit('*** Got invalid value {} for --reporting-console-tool-output-format. Expected one of {}\n' .format(value, ToolOutputFormat.keys())) # Mix in the new settings with the defaults. self.LABEL_FORMATTING.update(settings.label_format.items()) self.TOOL_OUTPUT_FORMATTING.update(settings.tool_output_format.items())
def __init__(self, run_tracker, settings): Reporter.__init__(self, run_tracker, settings) # The main report, and associated tool outputs, go under this dir. self._html_dir = settings.html_dir # We render HTML from mustache templates. self._renderer = MustacheRenderer(settings.template_dir, __name__) # We serve files relative to the build root. self._buildroot = get_buildroot() self._html_path_base = os.path.relpath(self._html_dir, self._buildroot) # We write the main report body to this file object. self._report_file = None # We redirect stdout, stderr etc. of tool invocations to these files. self._output_files = defaultdict(dict) # workunit_id -> {path -> fileobj}. self._linkify_memo = {} # Map from filename to timestamp (ms since the epoch) of when we last overwrote that file. # Useful for preventing too-frequent overwrites of, e.g., timing stats, # which can noticeably slow down short pants runs with many workunits. self._last_overwrite_time = {}
def __init__(self, run_tracker, settings): Reporter.__init__(self, run_tracker, settings) for key, value in settings.label_format.items(): if key not in WorkUnitLabel.keys(): self.emit( '*** Got invalid key {} for --reporting-console-label-format. Expected one of {}\n' .format(key, WorkUnitLabel.keys())) if value not in LabelFormat.keys(): self.emit( '*** Got invalid value {} for --reporting-console-label-format. Expected one of {}\n' .format(value, LabelFormat.keys())) for key, value in settings.tool_output_format.items(): if key not in WorkUnitLabel.keys(): self.emit( '*** Got invalid key {} for --reporting-console-tool-output-format. Expected one of {}\n' .format(key, WorkUnitLabel.keys())) if value not in ToolOutputFormat.keys(): self.emit( '*** Got invalid value {} for --reporting-console-tool-output-format. Expected one of {}\n' .format(value, ToolOutputFormat.keys())) # Mix in the new settings with the defaults. self.LABEL_FORMATTING.update(settings.label_format.items()) self.TOOL_OUTPUT_FORMATTING.update(settings.tool_output_format.items())
def __init__(self, run_tracker, settings): Reporter.__init__(self, run_tracker, settings) # The main report, and associated tool outputs, go under this dir. self._html_dir = settings.html_dir # We render HTML from mustache templates. self._renderer = MustacheRenderer(settings.template_dir, __name__) # We serve files relative to the build root. self._buildroot = get_buildroot() self._html_path_base = os.path.relpath(self._html_dir, self._buildroot) # We write the main report body to this file object. self._report_file = None # We redirect stdout, stderr etc. of tool invocations to these files. self._output_files = defaultdict( dict) # workunit_id -> {path -> fileobj}. self._linkify_memo = {} # Map from filename to timestamp (ms since the epoch) of when we last overwrote that file. # Useful for preventing too-frequent overwrites of, e.g., timing stats, # which can noticeably slow down short pants runs with many workunits. self._last_overwrite_time = {}
def __init__(self, run_tracker, settings): Reporter.__init__(self, run_tracker, settings)
def __init__(self, run_tracker, settings): Reporter.__init__(self, run_tracker, settings._replace(log_level=Report.ERROR))