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("")
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("")