Пример #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 result_events_dispatcher(self):
     # The result events dispatcher is shared with the test runner.
     # Because of our goal to support using the phases of a job
     # freely, let's get the result events dispatcher on first usage.
     # A future optimization may load it on demand.
     if self._result_events_dispatcher is None:
         self._result_events_dispatcher = dispatcher.ResultEventsDispatcher(
             self.config)
         output.log_plugin_failures(
             self._result_events_dispatcher.load_failures)
     return self._result_events_dispatcher
Пример #4
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("")