当前位置: 首页>>代码示例>>Python>>正文


Python LOG_UI.info方法代码示例

本文整理汇总了Python中avocado.core.output.LOG_UI.info方法的典型用法代码示例。如果您正苦于以下问题:Python LOG_UI.info方法的具体用法?Python LOG_UI.info怎么用?Python LOG_UI.info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在avocado.core.output.LOG_UI的用法示例。


在下文中一共展示了LOG_UI.info方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: run

# 需要导入模块: from avocado.core.output import LOG_UI [as 别名]
# 或者: from avocado.core.output.LOG_UI import info [as 别名]
    def run(self, args):
        LOG_UI.info("Config files read (in order, '*' means the file exists "
                    "and had been read):")
        for cfg_path in settings.all_config_paths:
            if cfg_path in settings.config_paths:
                LOG_UI.debug('    * %s', cfg_path)
            else:
                LOG_UI.debug('      %s', cfg_path)
        LOG_UI.debug("")
        if not args.datadir:
            blength = 0
            for section in settings.config.sections():
                for value in settings.config.items(section):
                    clength = len('%s.%s' % (section, value[0]))
                    if clength > blength:
                        blength = clength

            format_str = "    %-" + str(blength) + "s %s"

            LOG_UI.debug(format_str, 'Section.Key', 'Value')
            for section in settings.config.sections():
                for value in settings.config.items(section):
                    config_key = ".".join((section, value[0]))
                    LOG_UI.debug(format_str, config_key, value[1])
        else:
            LOG_UI.debug("Avocado replaces config dirs that can't be accessed")
            LOG_UI.debug("with sensible defaults. Please edit your local config")
            LOG_UI.debug("file to customize values")
            LOG_UI.debug('')
            LOG_UI.info('Avocado Data Directories:')
            LOG_UI.debug('    base     %s', data_dir.get_base_dir())
            LOG_UI.debug('    tests    %s', data_dir.get_test_dir())
            LOG_UI.debug('    data     %s', data_dir.get_data_dir())
            LOG_UI.debug('    logs     %s', data_dir.get_logs_dir())
            LOG_UI.debug('    cache    %s', ", ".join(data_dir.get_cache_dirs()))
开发者ID:avocado-framework,项目名称:avocado,代码行数:37,代码来源:config.py

示例2: run

# 需要导入模块: from avocado.core.output import LOG_UI [as 别名]
# 或者: from avocado.core.output.LOG_UI import info [as 别名]
    def run(self, args):
        LOG_UI.info('Config files read (in order):')
        for cfg_path in settings.config_paths:
            LOG_UI.debug('    %s' % cfg_path)
        if settings.config_paths_failed:
            LOG_UI.error('\nConfig files that failed to read:')
            for cfg_path in settings.config_paths_failed:
                LOG_UI.error('    %s' % cfg_path)
        LOG_UI.debug("")
        if not args.datadir:
            blength = 0
            for section in settings.config.sections():
                for value in settings.config.items(section):
                    clength = len('%s.%s' % (section, value[0]))
                    if clength > blength:
                        blength = clength

            format_str = "    %-" + str(blength) + "s %s"

            LOG_UI.debug(format_str, 'Section.Key', 'Value')
            for section in settings.config.sections():
                for value in settings.config.items(section):
                    config_key = ".".join((section, value[0]))
                    LOG_UI.debug(format_str, config_key, value[1])
        else:
            LOG_UI.debug("Avocado replaces config dirs that can't be accessed")
            LOG_UI.debug("with sensible defaults. Please edit your local config")
            LOG_UI.debug("file to customize values")
            LOG_UI.debug('')
            LOG_UI.info('Avocado Data Directories:')
            LOG_UI.debug('    base     ' + data_dir.get_base_dir())
            LOG_UI.debug('    tests    ' + data_dir.get_test_dir())
            LOG_UI.debug('    data     ' + data_dir.get_data_dir())
            LOG_UI.debug('    logs     ' + data_dir.get_logs_dir())
            LOG_UI.debug('    cache    ' + ", ".join(data_dir.get_cache_dirs()))
开发者ID:balamuruhans,项目名称:avocado,代码行数:37,代码来源:config.py

示例3: post_tests

# 需要导入模块: from avocado.core.output import LOG_UI [as 别名]
# 或者: from avocado.core.output.LOG_UI import info [as 别名]
 def post_tests(self, job):
     if not self.owns_stdout:
         return
     if job.status == 'PASS':
         LOG_UI.info("RESULTS    : PASS %d | ERROR %d | FAIL %d | SKIP %d | "
                     "WARN %d | INTERRUPT %s | CANCEL %s", job.result.passed,
                     job.result.errors, job.result.failed, job.result.skipped,
                     job.result.warned, job.result.interrupted,
                     job.result.cancelled)
开发者ID:EIChaoYang,项目名称:avocado,代码行数:11,代码来源:human.py

示例4: render

# 需要导入模块: from avocado.core.output import LOG_UI [as 别名]
# 或者: from avocado.core.output.LOG_UI import info [as 别名]
    def render(self, result, job):
        if job.status == "RUNNING":
            return  # Don't create results on unfinished jobs
        if not (hasattr(job.args, 'html_job_result') or
                hasattr(job.args, 'html_output')):
            return

        open_browser = getattr(job.args, 'open_browser', False)
        if getattr(job.args, 'html_job_result', 'off') == 'on':
            html_path = os.path.join(job.logdir, 'results.html')
            self._render(result, html_path)
            if getattr(job.args, 'stdout_claimed_by', None) is None:
                LOG_UI.info("JOB HTML   : %s", html_path)
            if open_browser:
                self._open_browser(html_path)
                open_browser = False

        html_path = getattr(job.args, 'html_output', 'None')
        if html_path is not None:
            self._render(result, html_path)
            if open_browser:
                self._open_browser(html_path)
开发者ID:dzhengfy,项目名称:avocado,代码行数:24,代码来源:__init__.py

示例5: pre_tests

# 需要导入模块: from avocado.core.output import LOG_UI [as 别名]
# 或者: from avocado.core.output.LOG_UI import info [as 别名]
 def pre_tests(self, job):
     if not self.owns_stdout:
         return
     LOG_UI.info("JOB ID     : %s", job.unique_id)
     replay_source_job = getattr(job.args, "replay_sourcejob", False)
     if replay_source_job:
         LOG_UI.info("SRC JOB ID : %s", replay_source_job)
     LOG_UI.info("JOB LOG    : %s", job.logfile)
开发者ID:EIChaoYang,项目名称:avocado,代码行数:10,代码来源:human.py

示例6: post

# 需要导入模块: from avocado.core.output import LOG_UI [as 别名]
# 或者: from avocado.core.output.LOG_UI import info [as 别名]
 def post(self, job):
     if job.status == 'PASS':
         if not getattr(job.args, 'stdout_claimed_by', None):
             LOG_UI.info("JOB TIME   : %.2f s", job.time_elapsed)
开发者ID:EIChaoYang,项目名称:avocado,代码行数:6,代码来源:human.py

示例7: render

# 需要导入模块: from avocado.core.output import LOG_UI [as 别名]
# 或者: from avocado.core.output.LOG_UI import info [as 别名]
 def render(self, result, job):
     if (getattr(job.args, 'resultsdb_logs', None) is not None and
             getattr(job.args, 'stdout_claimed_by', None) is None):
         LOG_UI.info("JOB URL    : %s/%s" % (job.args.resultsdb_logs,
                                             os.path.basename(job.logdir)))
开发者ID:dmonakhov,项目名称:avocado,代码行数:7,代码来源:__init__.py

示例8: _display

# 需要导入模块: from avocado.core.output import LOG_UI [as 别名]
# 或者: from avocado.core.output.LOG_UI import info [as 别名]
    def _display(self, test_matrix, stats, tag_stats):
        header = None
        if self.args.verbose:
            header = (output.TERM_SUPPORT.header_str('Type'),
                      output.TERM_SUPPORT.header_str('Test'),
                      output.TERM_SUPPORT.header_str('Tag(s)'))

        for line in astring.iter_tabular_output(test_matrix, header=header,
                                                strip=True):
            LOG_UI.debug(line)

        if self.args.verbose:
            LOG_UI.info("")
            LOG_UI.info("TEST TYPES SUMMARY")
            LOG_UI.info("==================")
            for key in sorted(stats):
                LOG_UI.info("%s: %s", key.upper(), stats[key])

            if tag_stats:
                LOG_UI.info("")
                LOG_UI.info("TEST TAGS SUMMARY")
                LOG_UI.info("=================")
                for key in sorted(tag_stats):
                    LOG_UI.info("%s: %s", key, tag_stats[key])
开发者ID:clebergnu,项目名称:avocado,代码行数:26,代码来源:list.py

示例9: run

# 需要导入模块: from avocado.core.output import LOG_UI [as 别名]
# 或者: from avocado.core.output.LOG_UI import info [as 别名]
    def run(self, args):
        def _get_name(test):
            return str(test['id'])

        def _get_name_no_id(test):
            return str(test['id']).split('-', 1)[1]

        job1_dir, job1_id = self._setup_job(args.jobids[0])
        job2_dir, job2_id = self._setup_job(args.jobids[1])

        job1_data = self._get_job_data(job1_dir)
        job2_data = self._get_job_data(job2_dir)

        report_header = 'Avocado Job Report\n'
        job1_results = [report_header]
        job2_results = [report_header]

        if 'cmdline' in args.diff_filter:
            cmdline1 = self._get_command_line(job1_dir)
            cmdline2 = self._get_command_line(job2_dir)

            if str(cmdline1) != str(cmdline2):
                command_line_header = ['\n',
                                       '# COMMAND LINE\n']
                job1_results.extend(command_line_header)
                job1_results.append(cmdline1)
                job2_results.extend(command_line_header)
                job2_results.append(cmdline2)

        if 'time' in args.diff_filter:
            time1 = '%.2f s\n' % job1_data['time']
            time2 = '%.2f s\n' % job2_data['time']

            if str(time1) != str(time2):
                total_time_header = ['\n',
                                     '# TOTAL TIME\n']
                job1_results.extend(total_time_header)
                job1_results.append(time1)
                job2_results.extend(total_time_header)
                job2_results.append(time2)

        if 'variants' in args.diff_filter:
            variants1 = self._get_variants(job1_dir)
            variants2 = self._get_variants(job2_dir)

            if str(variants1) != str(variants2):
                variants_header = ['\n',
                                   '# VARIANTS\n']
                job1_results.extend(variants_header)
                job1_results.extend(variants1)
                job2_results.extend(variants_header)
                job2_results.extend(variants2)

        if 'results' in args.diff_filter:
            results1 = []
            if args.diff_strip_id:
                get_name = _get_name_no_id
            else:
                get_name = _get_name
            for test in job1_data['tests']:
                test_result = '%s: %s\n' % (get_name(test),
                                            str(test['status']))
                results1.append(test_result)
            results2 = []
            for test in job2_data['tests']:
                test_result = '%s: %s\n' % (get_name(test),
                                            str(test['status']))
                results2.append(test_result)

            if str(results1) != str(results2):
                test_results_header = ['\n',
                                       '# TEST RESULTS\n']
                job1_results.extend(test_results_header)
                job1_results.extend(results1)
                job2_results.extend(test_results_header)
                job2_results.extend(results2)

        if 'config' in args.diff_filter:
            config1 = self._get_config(job1_dir)
            config2 = self._get_config(job2_dir)

            if str(config1) != str(config2):
                config_header = ['\n',
                                 '# SETTINGS\n']
                job1_results.extend(config_header)
                job1_results.extend(config1)
                job2_results.extend(config_header)
                job2_results.extend(config2)

        if 'sysinfo' in args.diff_filter:
            sysinfo_pre1 = self._get_sysinfo(job1_dir, 'pre')
            sysinfo_pre2 = self._get_sysinfo(job2_dir, 'pre')

            if str(sysinfo_pre1) != str(sysinfo_pre2):
                sysinfo_header_pre = ['\n',
                                      '# SYSINFO PRE\n']
                job1_results.extend(sysinfo_header_pre)
                job1_results.extend(sysinfo_pre1)
                job2_results.extend(sysinfo_header_pre)
                job2_results.extend(sysinfo_pre2)
#.........这里部分代码省略.........
开发者ID:avocado-framework,项目名称:avocado,代码行数:103,代码来源:diff.py

示例10: sleep

# 需要导入模块: from avocado.core.output import LOG_UI [as 别名]
# 或者: from avocado.core.output.LOG_UI import info [as 别名]
 def sleep(self, job):  # pylint: disable=W0613
     for i in range(1, self.seconds + 1):
         LOG_UI.info("Sleeping %2i/%s", i, self.seconds)
         time.sleep(1)
开发者ID:dzhengfy,项目名称:avocado,代码行数:6,代码来源:avocado_job_sleep.py

示例11: sleep

# 需要导入模块: from avocado.core.output import LOG_UI [as 别名]
# 或者: from avocado.core.output.LOG_UI import info [as 别名]
 def sleep(self, job):
     for i in xrange(1, self.seconds + 1):
         LOG_UI.info("Sleeping %2i/%s", i, self.seconds)
         time.sleep(1)
开发者ID:EIChaoYang,项目名称:avocado,代码行数:6,代码来源:avocado_job_sleep.py


注:本文中的avocado.core.output.LOG_UI.info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。