Пример #1
0
    def print_summary(cls, path):

        """
        Function is used for printing summary informations
        :return:
        """

        # First of all we would like to print all
        # summary information
        OutputLogger.set_info_text("Summary output is also available in log:", path)
        logger.info('\n')
        for key, value in six.iteritems(OutputLogger.get_summary_info()):
            logger.info("%s %s\n", key, value)

        try:
            LoggerHelper.add_file_handler(logger_output, path)
        except (OSError, IOError):
            raise RebaseHelperError("Can not create results file '%s'", path)

        type_pkgs = ['old', 'new']
        cls.print_patches(OutputLogger.get_patches(), '\nSummary information about patches:')
        for pkg in type_pkgs:
            type_pkg = OutputLogger.get_build(pkg)
            if type_pkg:
                cls.print_rpms(type_pkg, pkg.capitalize())
                cls.print_build_logs(type_pkg, pkg.capitalize())

        cls.print_pkgdiff_tool()
Пример #2
0
    def print_summary(cls, path):

        """
        Function is used for printing summary informations
        :return:
        """

        for key, value in six.iteritems(OutputLogger.get_summary_info()):
            logger.info("%s %s\n", key, value)

        try:
            LoggerHelper.add_file_handler(logger_report, path)
        except (OSError, IOError):
            raise RebaseHelperError("Can not create results file '%s'" % path)

        type_pkgs = ['old', 'new']
        if OutputLogger.get_patches():
            cls.print_patches(OutputLogger.get_patches(), '\nSummary information about patches:')
        for pkg in type_pkgs:
            type_pkg = OutputLogger.get_build(pkg)
            if type_pkg:
                cls.print_rpms(type_pkg, pkg.capitalize())
                cls.print_build_logs(type_pkg, pkg.capitalize())

        cls.print_pkgdiff_tool()
Пример #3
0
    def test_base_output_info(self):
        """
        Test Output logger info

        :return:
        """
        info_results = OutputLogger.get_summary_info()
        expect_dict = self.info_data
        expect_dict.update(self.info_data2)
        assert info_results == expect_dict