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)
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 __init__(self, debug=False, state=None): """ :param debug: Store whether this instance should debug varianter :param state: Force-varianter state :note: it's necessary to check whether variants debug is enable in order to provide the right results. """ if state is None: self.debug = debug self.node_class = tree.TreeNodeDebug if debug else tree.TreeNode self._variant_plugins = dispatcher.VarianterDispatcher() self._no_variants = None else: self.load(state)
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("")