Example #1
0
File: lcov.py Project: S2E/s2e-env
def _gen_html(lcov_info_path, lcov_html_dir):
    """
    Generate an LCOV HTML report.

    Returns the directory containing the HTML report.
    """
    try:
        genhtml(lcov_info_path,
                output_directory=lcov_html_dir,
                _out=sys.stdout,
                _err=sys.stderr)
    except ErrorReturnCode as e:
        raise CommandError(e) from e
Example #2
0
    def _gen_html(self, lcov_info_path):
        """
        Generate an LCOV HTML report.

        Returns the directory containing the HTML report.
        """
        from sh import genhtml, ErrorReturnCode

        lcov_html_dir = self.project_path('s2e-last', 'lcov')
        try:
            genhtml(lcov_info_path, output_directory=lcov_html_dir,
                    _out=sys.stdout, _err=sys.stderr, _fg=True)
        except ErrorReturnCode as e:
            raise CommandError(e)

        return lcov_html_dir