Ejemplo n.º 1
0
    def __init__(self, input_file, report_group):
        """
        Parse GDB helpers directives in the ``input_file`` coverage
        report, decode property DSL-level coverage from it and add this
        coverage information to ``report_group``.

        :param CoverageReport.File file_report: File coverage report to read.
        :param CoverageReport.Group report_group: Group of coverage reports
            under which DSL files should go.
        """
        self.input_file = input_file
        self.report_group = report_group
        self.debug_info = DebugInfo.parse_from_iterable(
            filename=input_file.name,
            lines=(line.content for line in input_file.lines))

        self.gen_to_cov = [[] for _ in self.input_file.lines]
        """
        :type: list[list[PropertyDSLCoverage.Data]]

        For each line in self.input_file (the generated source), list of
        coverage data for expressions that apply to this line.
        """

        self.orig_to_cov = {}
        """
        :type: dict[str, list[list[PropertyDSLCoverage.Data]]]

        For each line in each original source files (source file names are dict
        keys), list of coverage data for scopes that apply to this line.
        """

        self.map_lines()
        self.annotate()
        self.propagate()
Ejemplo n.º 2
0
 def reparse_debug_info(self):
     """
     Reload debug information from the analysis source file.
     """
     self.debug_info = DebugInfo.parse_from_gdb(self)