Пример #1
0
    def run(self, config):
        plugin_types = [
            (dispatcher.InitDispatcher(),
             'Plugins that always need to be initialized (init): '),
            (dispatcher.CLICmdDispatcher(),
             'Plugins that add new commands (cli.cmd):'),
            (dispatcher.CLIDispatcher(),
             'Plugins that add new options to commands (cli):'),
            (dispatcher.JobPrePostDispatcher(),
             'Plugins that run before/after the execution of jobs (job.prepost):'),
            (dispatcher.ResultDispatcher(),
             'Plugins that generate job result in different formats (result):'),
            (dispatcher.ResultEventsDispatcher(config),
             ('Plugins that generate job result based on job/test events '
              '(result_events):')),
            (dispatcher.VarianterDispatcher(),
             'Plugins that generate test variants (varianter): '),
            (Resolver(),
             'Plugins that resolve test references (resolver): '),
            (dispatcher.RunnerDispatcher(),
             'Plugins that run test suites on a job (runners): '),
        ]
        for plugins_active, msg in plugin_types:
            LOG_UI.info(msg)
            plugin_matrix = []
            for plugin in sorted(plugins_active, key=lambda x: x.name):
                plugin_matrix.append((plugin.name, plugin.obj.description))

            if not plugin_matrix:
                LOG_UI.debug("(No active plugin)")
            else:
                for line in astring.iter_tabular_output(plugin_matrix):
                    LOG_UI.debug(line)
                LOG_UI.debug("")
Пример #2
0
    def run(self, args):
        log = logging.getLogger("avocado.app")
        plugin_types = [
            (dispatcher.CLICmdDispatcher(),
             'Plugins that add new commands (cli.cmd):'),
            (dispatcher.CLIDispatcher(),
             'Plugins that add new options to commands (cli):'),
            (dispatcher.JobPrePostDispatcher(),
             'Plugins that run before/after the execution of jobs (job.prepost):'
             ),
            (dispatcher.ResultDispatcher(),
             'Plugins that generate job result in different formats (result):'
             ),
            (dispatcher.ResultEventsDispatcher(args),
             ('Plugins that generate job result based on job/test events '
              '(result_events):')),
            (dispatcher.VarianterDispatcher(),
             'Plugins that generate test variants (varianter): ')
        ]
        for plugins_active, msg in plugin_types:
            log.info(msg)
            plugin_matrix = []
            for plugin in sorted(plugins_active, key=lambda x: x.name):
                plugin_matrix.append((plugin.name, plugin.obj.description))

            if not plugin_matrix:
                log.debug("(No active plugin)")
            else:
                for line in astring.iter_tabular_output(plugin_matrix):
                    log.debug(line)
Пример #3
0
    def run(self, config):
        plugin_types = [
            (dispatcher.InitDispatcher(),
             'Plugins that always need to be initialized (init): '),
            (dispatcher.CLICmdDispatcher(),
             'Plugins that add new commands (cli.cmd):'),
            (dispatcher.CLIDispatcher(),
             'Plugins that add new options to commands (cli):'),
            (dispatcher.JobPrePostDispatcher(),
             'Plugins that run before/after the execution of jobs (job.prepost):'),
            (dispatcher.ResultDispatcher(),
             'Plugins that generate job result in different formats (result):'),
            (dispatcher.ResultEventsDispatcher(config),
             ('Plugins that generate job result based on job/test events '
              '(result_events):')),
            (dispatcher.VarianterDispatcher(),
             'Plugins that generate test variants (varianter): '),
            (Resolver(),
             'Plugins that resolve test references (resolver): '),
            (dispatcher.RunnerDispatcher(),
             'Plugins that run test suites on a job (runners): '),
            (dispatcher.SpawnerDispatcher(),
             'Plugins that spawn tasks and know about their status (spawner): '),
            (dispatcher.RunnableRunnerDispatcher(),
             'Plugins that run runnables (under a task and spawner) (runnable.runner): '),
        ]
        for plugins_active, msg in plugin_types:
            LOG_UI.info(msg)
            plugin_matrix = []
            if config.get('plugins.ordered_list'):
                sorted_plugins = plugins_active.get_extentions_by_priority()
            else:
                sorted_plugins = plugins_active.get_extentions_by_name()
            for plugin in sorted_plugins:
                plugin_matrix.append((plugin.name, plugin.obj.description))

            if not plugin_matrix:
                LOG_UI.debug("(No active plugin)")
            else:
                for line in astring.iter_tabular_output(plugin_matrix):
                    LOG_UI.debug(line)
                LOG_UI.debug("")
Пример #4
0
    def run(self, args):
        log = logging.getLogger("avocado.app")
        plugin_types = [
            (dispatcher.CLICmdDispatcher(),
             'Plugins that add new commands (avocado.plugins.cli.cmd):'),
            (dispatcher.CLIDispatcher(),
             'Plugins that add new options to commands (avocado.plugins.cli):'),
            (dispatcher.JobPrePostDispatcher(),
             'Plugins that run before/after the execution of jobs (avocado.plugins.job.prepost):')
        ]
        for plugins_active, msg in plugin_types:
            log.info(msg)
            plugin_matrix = []
            for plugin in sorted(plugins_active):
                plugin_matrix.append((plugin.name, plugin.obj.description))

            if not plugin_matrix:
                log.debug("(No active plugin)")
            else:
                for line in astring.iter_tabular_output(plugin_matrix):
                    log.debug(line)
Пример #5
0
    def run(self, args):
        log = logging.getLogger("avocado.app")
        cli_cmds = dispatcher.CLICmdDispatcher()
        msg = 'Plugins that add new commands (avocado.plugins.cli.cmd):'
        log.info(msg)
        plugin_matrix = []
        for plugin in sorted(cli_cmds):
            plugin_matrix.append((plugin.name, plugin.obj.description))

        for line in astring.iter_tabular_output(plugin_matrix):
            log.debug(line)

        msg = 'Plugins that add new options to commands (avocado.plugins.cli):'
        cli = dispatcher.CLIDispatcher()
        log.info(msg)
        plugin_matrix = []
        for plugin in sorted(cli):
            plugin_matrix.append((plugin.name, plugin.obj.description))

        for line in astring.iter_tabular_output(plugin_matrix):
            log.debug(line)
Пример #6
0
    def run(self, args):
        view = output.View(app_args=args, use_paginator=args.paginator == 'on')

        cli_cmds = dispatcher.CLICmdDispatcher()
        msg = 'Plugins that add new commands (avocado.plugins.cli.cmd):'
        view.notify(event='message', msg=msg)
        plugin_matrix = []
        for plugin in sorted(cli_cmds):
            plugin_matrix.append((plugin.name, plugin.obj.description))

        for line in astring.iter_tabular_output(plugin_matrix):
            view.notify(event='minor', msg=line)

        msg = 'Plugins that add new options to commands (avocado.plugins.cli):'
        cli = dispatcher.CLIDispatcher()
        view.notify(event='message', msg=msg)
        plugin_matrix = []
        for plugin in sorted(cli):
            plugin_matrix.append((plugin.name, plugin.obj.description))

        for line in astring.iter_tabular_output(plugin_matrix):
            view.notify(event='minor', msg=line)