From a0d4cd772e08ae9d95c10f8e1382cea7ca126f21 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Tue, 15 Dec 2015 23:14:31 -0200 Subject: [PATCH] Old Plugin Architecture: disable legacy plugin manager completely At this point, no plugin support exists in Avocado. This is in preparation for the new plugin code to be cleanly introduced. The plugins that play a role in the plugin architecture have been removed, since they wouldn't be functional under the new plugin management code. The ones that are add extra functionality to Avocado have been kept, and will be ported to the new architecture. Also, most of the functional tests have been temporarily disabled. The reason is that most of them run avocado, which depends on the run command, which in turn, depends on the plugin archicture code. Signed-off-by: Cleber Rosa --- avocado/core/app.py | 13 --- avocado/core/job.py | 46 -------- avocado/core/plugins/builtin.py | 71 ------------ avocado/core/plugins/manager.py | 104 ------------------ avocado/core/plugins/plugin_list.py | 74 ------------- selftests/functional/test_argument_parsing.py | 4 + selftests/functional/test_basic.py | 50 +++++++++ selftests/functional/test_export_variables.py | 8 +- selftests/functional/test_gdb.py | 9 +- selftests/functional/test_interrupt.py | 2 + selftests/functional/test_job_timeout.py | 5 + selftests/functional/test_journal.py | 9 +- selftests/functional/test_loader.py | 7 ++ selftests/functional/test_multiplex.py | 9 ++ selftests/functional/test_output.py | 13 +++ selftests/functional/test_output_check.py | 6 + selftests/functional/test_sysinfo.py | 2 + selftests/functional/test_wrapper.py | 10 +- 18 files changed, 130 insertions(+), 312 deletions(-) delete mode 100644 avocado/core/plugins/builtin.py delete mode 100644 avocado/core/plugins/manager.py delete mode 100644 avocado/core/plugins/plugin_list.py diff --git a/avocado/core/app.py b/avocado/core/app.py index 0d18d846..94d313ef 100644 --- a/avocado/core/app.py +++ b/avocado/core/app.py @@ -20,7 +20,6 @@ import os from .log import configure as configure_log from .parser import Parser -from .plugins.manager import get_plugin_manager class AvocadoApp(object): @@ -35,27 +34,15 @@ class AvocadoApp(object): os.environ['LIBC_FATAL_STDERR_'] = '1' configure_log() - self.plugin_manager = None self.parser = Parser() self.parser.start() - self.load_plugin_manager() self.ready = True try: self.parser.resume() - self.plugin_manager.activate(self.parser.args) self.parser.finish() except IOError: self.ready = False - def load_plugin_manager(self): - """Load Plugin Manager. - - :param plugins_dir: Extra plugins directory. - """ - self.plugin_manager = get_plugin_manager() - self.plugin_manager.load_plugins() - self.plugin_manager.configure(self.parser) - def run(self): if self.ready: return self.parser.take_action() diff --git a/avocado/core/job.py b/avocado/core/job.py index 4d8f047c..821fe4b2 100644 --- a/avocado/core/job.py +++ b/avocado/core/job.py @@ -41,10 +41,8 @@ from . import multiplexer from . import tree from . import test from .settings import settings -from .plugins import manager from .plugins import jsonresult from .plugins import xunit -from .plugins.builtin import ErrorsLoading from ..utils import archive from ..utils import astring from ..utils import path @@ -300,13 +298,6 @@ class Job(object): filtered_suite.append(test_template) return filtered_suite - @staticmethod - def _log_plugin_load_errors(): - job_log = _TEST_LOGGER - for plugin_failed in ErrorsLoading: - job_log.error('Error loading %s -> %s' % plugin_failed) - job_log.error('') - def _log_job_id(self): job_log = _TEST_LOGGER job_log.info('Job ID: %s', self.unique_id) @@ -375,42 +366,6 @@ class Job(object): job_log.info('logs ' + data_dir.get_logs_dir()) job_log.info('') - @staticmethod - def _log_avocado_plugins(): - job_log = _TEST_LOGGER - pm = manager.get_plugin_manager() - - enabled = [p for p in pm.plugins if p.enabled] - disabled = [p for p in pm.plugins if not p.enabled] - - if enabled: - enabled_matrix = [] - for plug in sorted(enabled): - enabled_matrix.append([plug.name, plug.description]) - job_log.info("Plugins enabled:") - for line in astring.iter_tabular_output(enabled_matrix): - job_log.info(line) - - if disabled: - disabled_matrix = [] - for plug in sorted(disabled): - disabled_matrix.append([plug.name, plug.description]) - job_log.info("Plugins disabled:") - for line in astring.iter_tabular_output(disabled_matrix): - job_log.info(line) - - if ErrorsLoading: - unloadable_matrix = [] - for load_error in sorted(ErrorsLoading): - unloadable_matrix.append([plug.name, "%s -> %s" % - (load_error[0], load_error[1])]) - - job_log.info("Unloadable plugin modules:") - for line in astring.iter_tabular_output(unloadable_matrix): - job_log.info(line) - - job_log.info('') - def _log_mux_tree(self, mux): job_log = _TEST_LOGGER tree_repr = tree.tree_view(mux.variants.root, verbose=True, @@ -442,7 +397,6 @@ class Job(object): """ self._log_cmdline() self._log_avocado_version() - self._log_avocado_plugins() self._log_avocado_config() self._log_avocado_datadir() self._log_mux_tree(mux) diff --git a/avocado/core/plugins/builtin.py b/avocado/core/plugins/builtin.py deleted file mode 100644 index 1391694e..00000000 --- a/avocado/core/plugins/builtin.py +++ /dev/null @@ -1,71 +0,0 @@ -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# See LICENSE for more details. -# -# Copyright: Red Hat Inc. 2013-2014 -# Author: Ruda Moura - -"""Builtin plugins.""" - -import os -import sys -import logging -from importlib import import_module - -from .plugin import Plugin -from ..settings import settings -from ...utils import stacktrace - -log = logging.getLogger("avocado.app") - -__all__ = ['load_builtins'] - -Modules = ['avocado.core.plugins.' + x[:-3] - for x in os.listdir(os.path.dirname(__file__)) - if x.endswith('.py')] - -Exclude = ['avocado.core.plugins.__init__', - 'avocado.core.plugins.builtin', - 'avocado.core.plugins.plugin', - 'avocado.core.plugins.manager'] - -Builtins = [x for x in Modules if x not in Exclude] - -ErrorsLoading = [] - - -def load_builtins(): - """ - Load builtin plugins. - - :return: a list of plugin classes, ordered by `priority`. - """ - plugins = [] - skip_notify = settings.get_value(section='plugins', - key='skip_broken_plugin_notification', - key_type=list) - for module in Builtins: - try: - plugin_mod = import_module(module) - except Exception as err: - name = str(module) - reason = '%s %s' % (str(err.__class__.__name__), err) - if name not in skip_notify: - log.error('Error loading %s -> %s', name, reason) - ErrorsLoading.append((name, reason)) - stacktrace.log_exc_info(sys.exc_info(), - 'avocado.app.tracebacks') - continue - for name in plugin_mod.__dict__: - obj = getattr(plugin_mod, name) - if isinstance(obj, type) and issubclass(obj, Plugin): - plugin = getattr(plugin_mod, name) - plugins.append(plugin) - return sorted(plugins, key=lambda plugin: plugin.priority) diff --git a/avocado/core/plugins/manager.py b/avocado/core/plugins/manager.py deleted file mode 100644 index 427f5d58..00000000 --- a/avocado/core/plugins/manager.py +++ /dev/null @@ -1,104 +0,0 @@ -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# See LICENSE for more details. -# -# Copyright: Red Hat Inc. 2013-2014 -# Author: Ruda Moura - -"""Plugin Managers.""" - -import logging - -from .builtin import load_builtins - - -DefaultPluginManager = None - -log = logging.getLogger("avocado.plugins") - - -class PluginManager(object): - - """ - Base class for plugins manager. - - You'll inherit from this to write you own plugins manager. - """ - - def __init__(self): - self.plugins = [] - - def add_plugin(self, plugin): - self.plugins.append(plugin) - - def load_plugins(self): - raise NotImplementedError('Managers must implement the method load_plugins') - - def configure(self, parser): - for plugin in self.plugins: - if plugin.enabled: - try: - plugin.configure(parser) - except Exception as err: - log.error("Could not configure plugin '%s': %s", - plugin.name, err) - - def activate(self, app_args): - for plugin in self.plugins: - if plugin.configured: - try: - plugin.activate(app_args) - except Exception as err: - log.error("Could not activate plugin '%s': %s", - plugin.name, err) - - -class BuiltinPluginManager(PluginManager): - - """ - Builtins plugin manager. - """ - - def load_plugins(self): - for plugin in load_builtins(): - try: - self.add_plugin(plugin()) - except Exception as err: - if hasattr(plugin, 'name'): - name = plugin.name - else: - name = str(plugin) - log.error("Could not activate builtin plugin '%s': %s", - name, err) - - -class AvocadoPluginManager(BuiltinPluginManager): - - """ - Avocado Plugin Manager. - - Load builtins and external plugins. - """ - - def __init__(self): - BuiltinPluginManager.__init__(self) - - def load_plugins(self): - BuiltinPluginManager.load_plugins(self) - - -def get_plugin_manager(): - """ - Get default plugin manager. - """ - global DefaultPluginManager - if DefaultPluginManager is None: - DefaultPluginManager = AvocadoPluginManager() - return DefaultPluginManager diff --git a/avocado/core/plugins/plugin_list.py b/avocado/core/plugins/plugin_list.py deleted file mode 100644 index a4874f2b..00000000 --- a/avocado/core/plugins/plugin_list.py +++ /dev/null @@ -1,74 +0,0 @@ -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# See LICENSE for more details. -# -# Copyright: Red Hat Inc. 2013-2014 -# Author: Ruda Moura - -from . import plugin -from .builtin import ErrorsLoading -from .manager import get_plugin_manager -from .. import output - - -class PluginList(plugin.Plugin): - - """ - Implements the avocado 'plugins' subcommand - """ - - name = 'plugins_list' - enabled = True - - def configure(self, parser): - self.parser = parser.subcommands.add_parser( - 'plugins', - help='List all plugins loaded') - self.parser.add_argument('--paginator', - choices=('on', 'off'), default='on', - help='Turn the paginator on/off. ' - 'Current: %(default)s') - super(PluginList, self).configure(self.parser) - - def run(self, args): - view = output.View(app_args=args, - use_paginator=args.paginator == 'on') - pm = get_plugin_manager() - - enabled = [p for p in pm.plugins if p.enabled] - disabled = [p for p in pm.plugins if not p.enabled] - - blength = 0 - for plug in pm.plugins: - clength = len(plug.name) - if clength > blength: - blength = clength - for load_error in ErrorsLoading: - clength = len(load_error[0]) - if clength > blength: - blength = clength - format_str = " %-" + str(blength + 1) + "s %s" - - if enabled: - view.notify(event='message', msg=output.term_support.healthy_str("Plugins enabled:")) - for plug in sorted(enabled): - view.notify(event='minor', msg=format_str % (plug.name, plug.description)) - - if disabled: - view.notify(event='message', msg=output.term_support.fail_header_str('Plugins disabled:')) - for plug in sorted(disabled): - view.notify(event='minor', msg=format_str % (plug.name, "Disabled during plugin configuration")) - - if ErrorsLoading: - view.notify(event='message', msg=output.term_support.fail_header_str('Unloadable plugin modules:')) - for load_error in sorted(ErrorsLoading): - view.notify(event='minor', msg=format_str % (load_error[0], load_error[1])) - - view.cleanup() diff --git a/selftests/functional/test_argument_parsing.py b/selftests/functional/test_argument_parsing.py index 2fb6b1d3..800627ea 100644 --- a/selftests/functional/test_argument_parsing.py +++ b/selftests/functional/test_argument_parsing.py @@ -27,6 +27,7 @@ class ArgumentParsingTest(unittest.TestCase): self.assertEqual(result.exit_status, expected_rc, 'Avocado did not return rc %d:\n%s' % (expected_rc, result)) + @unittest.skip("Temporary plugin infrastructure removal") def test_known_command_bad_choice(self): os.chdir(basedir) cmd_line = './scripts/avocado run --sysinfo=foo passtest' @@ -35,6 +36,7 @@ class ArgumentParsingTest(unittest.TestCase): self.assertEqual(result.exit_status, expected_rc, 'Avocado did not return rc %d:\n%s' % (expected_rc, result)) + @unittest.skip("Temporary plugin infrastructure removal") def test_known_command_bad_argument(self): os.chdir(basedir) cmd_line = './scripts/avocado run --sysinfo=off --whacky-argument passtest' @@ -66,9 +68,11 @@ class ArgumentParsingErrorEarlyTest(unittest.TestCase): path_job_glob = os.path.join(log_dir, "job-*-%s" % job[0:7]) self.assertEquals(glob.glob(path_job_glob), []) + @unittest.skip("Temporary plugin infrastructure removal") def test_whacky_option(self): self.run_but_fail_before_create_job_dir('--whacky-option passtest') + @unittest.skip("Temporary plugin infrastructure removal") def test_empty_option(self): self.run_but_fail_before_create_job_dir('') diff --git a/selftests/functional/test_basic.py b/selftests/functional/test_basic.py index 27d8dd0c..b9e805a5 100644 --- a/selftests/functional/test_basic.py +++ b/selftests/functional/test_basic.py @@ -62,28 +62,33 @@ class RunnerOperationTest(unittest.TestCase): def setUp(self): self.tmpdir = tempfile.mkdtemp(prefix='avocado_' + __name__) + @unittest.skip("Temporary plugin infrastructure removal") def test_runner_all_ok(self): os.chdir(basedir) cmd_line = './scripts/avocado run --sysinfo=off --job-results-dir %s passtest passtest' % self.tmpdir process.run(cmd_line) + @unittest.skip("Temporary plugin infrastructure removal") def test_datadir_alias(self): os.chdir(basedir) cmd_line = './scripts/avocado run --sysinfo=off --job-results-dir %s datadir' % self.tmpdir process.run(cmd_line) + @unittest.skip("Temporary plugin infrastructure removal") def test_datadir_noalias(self): os.chdir(basedir) cmd_line = ('./scripts/avocado run --sysinfo=off --job-results-dir %s examples/tests/datadir.py ' 'examples/tests/datadir.py' % self.tmpdir) process.run(cmd_line) + @unittest.skip("Temporary plugin infrastructure removal") def test_runner_noalias(self): os.chdir(basedir) cmd_line = ("./scripts/avocado run --sysinfo=off --job-results-dir %s examples/tests/passtest.py " "examples/tests/passtest.py" % self.tmpdir) process.run(cmd_line) + @unittest.skip("Temporary plugin infrastructure removal") def test_runner_tests_fail(self): os.chdir(basedir) cmd_line = './scripts/avocado run --sysinfo=off --job-results-dir %s passtest failtest passtest' % self.tmpdir @@ -92,6 +97,7 @@ class RunnerOperationTest(unittest.TestCase): self.assertEqual(result.exit_status, expected_rc, "Avocado did not return rc %d:\n%s" % (expected_rc, result)) + @unittest.skip("Temporary plugin infrastructure removal") def test_runner_nonexistent_test(self): os.chdir(basedir) cmd_line = './scripts/avocado run --sysinfo=off --job-results-dir %s bogustest' % self.tmpdir @@ -103,6 +109,7 @@ class RunnerOperationTest(unittest.TestCase): self.assertEqual(result.exit_status, expected_rc, "Avocado did not return rc %d:\n%s" % (expected_rc, result)) + @unittest.skip("Temporary plugin infrastructure removal") def test_runner_doublefail(self): os.chdir(basedir) cmd_line = './scripts/avocado run --sysinfo=off --job-results-dir %s --xunit - doublefail' % self.tmpdir @@ -120,6 +127,7 @@ class RunnerOperationTest(unittest.TestCase): output, "Test did not fail with action exception:\n%s" % output) + @unittest.skip("Temporary plugin infrastructure removal") def test_uncaught_exception(self): os.chdir(basedir) cmd_line = ("./scripts/avocado run --sysinfo=off --job-results-dir %s " @@ -131,6 +139,7 @@ class RunnerOperationTest(unittest.TestCase): result)) self.assertIn('"status": "ERROR"', result.stdout) + @unittest.skip("Temporary plugin infrastructure removal") def test_fail_on_exception(self): os.chdir(basedir) cmd_line = ("./scripts/avocado run --sysinfo=off --job-results-dir %s " @@ -142,6 +151,7 @@ class RunnerOperationTest(unittest.TestCase): result)) self.assertIn('"status": "FAIL"', result.stdout) + @unittest.skip("Temporary plugin infrastructure removal") def test_runner_timeout(self): os.chdir(basedir) cmd_line = './scripts/avocado run --sysinfo=off --job-results-dir %s --xunit - timeouttest' % self.tmpdir @@ -158,6 +168,7 @@ class RunnerOperationTest(unittest.TestCase): # Ensure no test aborted error messages show up self.assertNotIn("TestAbortedError: Test aborted unexpectedly", output) + @unittest.skip("Temporary plugin infrastructure removal") def test_runner_abort(self): os.chdir(basedir) cmd_line = './scripts/avocado run --sysinfo=off --job-results-dir %s --xunit - abort' % self.tmpdir @@ -172,6 +183,7 @@ class RunnerOperationTest(unittest.TestCase): "Avocado did not return rc %d:\n%s" % (expected_rc, result)) self.assertIn(excerpt, output) + @unittest.skip("Temporary plugin infrastructure removal") def test_silent_output(self): os.chdir(basedir) cmd_line = './scripts/avocado run --sysinfo=off --job-results-dir %s passtest --silent' % self.tmpdir @@ -181,6 +193,7 @@ class RunnerOperationTest(unittest.TestCase): self.assertEqual(result.exit_status, expected_rc) self.assertEqual(result.stderr, expected_output) + @unittest.skip("Temporary plugin infrastructure removal") def test_empty_args_list(self): os.chdir(basedir) cmd_line = './scripts/avocado' @@ -190,6 +203,7 @@ class RunnerOperationTest(unittest.TestCase): self.assertEqual(result.exit_status, expected_rc) self.assertIn(expected_output, result.stderr) + @unittest.skip("Temporary plugin infrastructure removal") def test_empty_test_list(self): os.chdir(basedir) cmd_line = './scripts/avocado run --sysinfo=off' @@ -199,6 +213,7 @@ class RunnerOperationTest(unittest.TestCase): self.assertEqual(result.exit_status, expected_rc) self.assertIn(expected_output, result.stderr) + @unittest.skip("Temporary plugin infrastructure removal") def test_not_found(self): os.chdir(basedir) cmd_line = './scripts/avocado run --sysinfo=off sbrubles' @@ -208,6 +223,7 @@ class RunnerOperationTest(unittest.TestCase): self.assertIn('Unable to discover url', result.stderr) self.assertNotIn('Unable to discover url', result.stdout) + @unittest.skip("Temporary plugin infrastructure removal") def test_invalid_unique_id(self): cmd_line = './scripts/avocado run --sysinfo=off --force-job-id foobar passtest' result = process.run(cmd_line, ignore_status=True) @@ -215,6 +231,7 @@ class RunnerOperationTest(unittest.TestCase): self.assertIn('needs to be a 40 digit hex', result.stderr) self.assertNotIn('needs to be a 40 digit hex', result.stdout) + @unittest.skip("Temporary plugin infrastructure removal") def test_valid_unique_id(self): cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off ' '--force-job-id 975de258ac05ce5e490648dec4753657b7ccc7d1 passtest' % self.tmpdir) @@ -223,6 +240,7 @@ class RunnerOperationTest(unittest.TestCase): self.assertNotIn('needs to be a 40 digit hex', result.stderr) self.assertIn('PASS', result.stdout) + @unittest.skip("Temporary plugin infrastructure removal") def test_automatic_unique_id(self): cmd_line = './scripts/avocado run --job-results-dir %s --sysinfo=off passtest --json -' % self.tmpdir result = process.run(cmd_line, ignore_status=True) @@ -231,6 +249,7 @@ class RunnerOperationTest(unittest.TestCase): int(r['job_id'], 16) # it's an hex number self.assertEqual(len(r['job_id']), 40) + @unittest.skip("Temporary plugin infrastructure removal") def test_skip_outside_setup(self): os.chdir(basedir) cmd_line = ("./scripts/avocado run --sysinfo=off --job-results-dir %s " @@ -242,6 +261,7 @@ class RunnerOperationTest(unittest.TestCase): result)) self.assertIn('"status": "ERROR"', result.stdout) + @unittest.skip("Temporary plugin infrastructure removal") def test_early_latest_result(self): """ Tests that the `latest` link to the latest job results is created early @@ -260,6 +280,7 @@ class RunnerOperationTest(unittest.TestCase): self.assertTrue(os.path.exists(link)) self.assertTrue(os.path.islink(link)) + @unittest.skip("Temporary plugin infrastructure removal") def test_dry_run(self): os.chdir(basedir) cmd = ("./scripts/avocado run --sysinfo=off passtest failtest " @@ -294,6 +315,7 @@ class RunnerHumanOutputTest(unittest.TestCase): def setUp(self): self.tmpdir = tempfile.mkdtemp(prefix='avocado_' + __name__) + @unittest.skip("Temporary plugin infrastructure removal") def test_output_pass(self): os.chdir(basedir) cmd_line = './scripts/avocado run --sysinfo=off --job-results-dir %s passtest' % self.tmpdir @@ -304,6 +326,7 @@ class RunnerHumanOutputTest(unittest.TestCase): (expected_rc, result)) self.assertIn('passtest.py:PassTest.test: PASS', result.stdout) + @unittest.skip("Temporary plugin infrastructure removal") def test_output_fail(self): os.chdir(basedir) cmd_line = './scripts/avocado run --sysinfo=off --job-results-dir %s failtest' % self.tmpdir @@ -314,6 +337,7 @@ class RunnerHumanOutputTest(unittest.TestCase): (expected_rc, result)) self.assertIn('failtest.py:FailTest.test: FAIL', result.stdout) + @unittest.skip("Temporary plugin infrastructure removal") def test_output_error(self): os.chdir(basedir) cmd_line = './scripts/avocado run --sysinfo=off --job-results-dir %s errortest' % self.tmpdir @@ -324,6 +348,7 @@ class RunnerHumanOutputTest(unittest.TestCase): (expected_rc, result)) self.assertIn('errortest.py:ErrorTest.test: ERROR', result.stdout) + @unittest.skip("Temporary plugin infrastructure removal") def test_output_skip(self): os.chdir(basedir) cmd_line = './scripts/avocado run --sysinfo=off --job-results-dir %s skiponsetup' % self.tmpdir @@ -335,6 +360,7 @@ class RunnerHumanOutputTest(unittest.TestCase): self.assertIn('skiponsetup.py:SkipOnSetupTest.test_wont_be_executed:' ' SKIP', result.stdout) + @unittest.skip("Temporary plugin infrastructure removal") def test_ugly_echo_cmd(self): if not os.path.exists("/bin/echo"): self.skipTest("Program /bin/echo does not exist") @@ -380,6 +406,7 @@ class RunnerSimpleTest(unittest.TestCase): 'functional') self.fail_script.save() + @unittest.skip("Temporary plugin infrastructure removal") def test_simpletest_pass(self): os.chdir(basedir) cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off' @@ -390,6 +417,7 @@ class RunnerSimpleTest(unittest.TestCase): "Avocado did not return rc %d:\n%s" % (expected_rc, result)) + @unittest.skip("Temporary plugin infrastructure removal") def test_simpletest_fail(self): os.chdir(basedir) cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off' @@ -400,6 +428,7 @@ class RunnerSimpleTest(unittest.TestCase): "Avocado did not return rc %d:\n%s" % (expected_rc, result)) + @unittest.skip("Temporary plugin infrastructure removal") def test_runner_onehundred_fail_timing(self): """ We can be pretty sure that a failtest should return immediattely. Let's @@ -420,6 +449,7 @@ class RunnerSimpleTest(unittest.TestCase): self.assertEqual(result.exit_status, expected_rc, "Avocado did not return rc %d:\n%s" % (expected_rc, result)) + @unittest.skip("Temporary plugin infrastructure removal") def test_runner_sleep_fail_sleep_timing(self): """ Sleeptest is supposed to take 1 second, let's make a sandwich of @@ -437,6 +467,7 @@ class RunnerSimpleTest(unittest.TestCase): self.assertEqual(result.exit_status, expected_rc, "Avocado did not return rc %d:\n%s" % (expected_rc, result)) + @unittest.skip("Temporary plugin infrastructure removal") def test_simplewarning(self): """ simplewarning.sh uses the avocado-bash-utils @@ -477,6 +508,7 @@ class ExternalRunnerTest(unittest.TestCase): 'avocado_externalrunner_functional') self.fail_script.save() + @unittest.skip("Temporary plugin infrastructure removal") def test_externalrunner_pass(self): os.chdir(basedir) cmd_line = './scripts/avocado run --job-results-dir %s --sysinfo=off --external-runner=/bin/sh %s' @@ -487,6 +519,7 @@ class ExternalRunnerTest(unittest.TestCase): "Avocado did not return rc %d:\n%s" % (expected_rc, result)) + @unittest.skip("Temporary plugin infrastructure removal") def test_externalrunner_fail(self): os.chdir(basedir) cmd_line = './scripts/avocado run --job-results-dir %s --sysinfo=off --external-runner=/bin/sh %s' @@ -497,6 +530,7 @@ class ExternalRunnerTest(unittest.TestCase): "Avocado did not return rc %d:\n%s" % (expected_rc, result)) + @unittest.skip("Temporary plugin infrastructure removal") def test_externalrunner_chdir_no_testdir(self): os.chdir(basedir) cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off --external-runner=/bin/sh ' @@ -528,6 +562,7 @@ class AbsPluginsTest(object): class PluginsTest(AbsPluginsTest, unittest.TestCase): + @unittest.skip("Temporary plugin infrastructure removal") def test_sysinfo_plugin(self): os.chdir(basedir) cmd_line = './scripts/avocado sysinfo %s' % self.base_outputdir @@ -539,6 +574,7 @@ class PluginsTest(AbsPluginsTest, unittest.TestCase): sysinfo_files = os.listdir(self.base_outputdir) self.assertGreater(len(sysinfo_files), 0, "Empty sysinfo files dir") + @unittest.skip("Temporary plugin infrastructure removal") def test_list_plugin(self): os.chdir(basedir) cmd_line = './scripts/avocado list' @@ -550,6 +586,7 @@ class PluginsTest(AbsPluginsTest, unittest.TestCase): (expected_rc, result)) self.assertNotIn('No tests were found on current tests dir', output) + @unittest.skip("Temporary plugin infrastructure removal") def test_list_error_output(self): os.chdir(basedir) cmd_line = './scripts/avocado list sbrubles' @@ -561,6 +598,7 @@ class PluginsTest(AbsPluginsTest, unittest.TestCase): (expected_rc, result)) self.assertIn("Unable to discover url", output) + @unittest.skip("Temporary plugin infrastructure removal") def test_plugin_list(self): os.chdir(basedir) cmd_line = './scripts/avocado plugins' @@ -573,6 +611,7 @@ class PluginsTest(AbsPluginsTest, unittest.TestCase): if sys.version_info[:2] >= (2, 7, 0): self.assertNotIn('Disabled', output) + @unittest.skip("Temporary plugin infrastructure removal") def test_config_plugin(self): os.chdir(basedir) cmd_line = './scripts/avocado config --paginator off' @@ -584,6 +623,7 @@ class PluginsTest(AbsPluginsTest, unittest.TestCase): (expected_rc, result)) self.assertNotIn('Disabled', output) + @unittest.skip("Temporary plugin infrastructure removal") def test_config_plugin_datadir(self): os.chdir(basedir) cmd_line = './scripts/avocado config --datadir --paginator off' @@ -595,6 +635,7 @@ class PluginsTest(AbsPluginsTest, unittest.TestCase): (expected_rc, result)) self.assertNotIn('Disabled', output) + @unittest.skip("Temporary plugin infrastructure removal") def test_Namespace_object_has_no_attribute(self): os.chdir(basedir) cmd_line = './scripts/avocado plugins' @@ -661,18 +702,22 @@ class PluginsXunitTest(AbsPluginsTest, unittest.TestCase): "Unexpected number of test skips, " "XML:\n%s" % xml_output) + @unittest.skip("Temporary plugin infrastructure removal") def test_xunit_plugin_passtest(self): self.run_and_check('passtest', exit_codes.AVOCADO_ALL_OK, 1, 0, 0, 0, 0) + @unittest.skip("Temporary plugin infrastructure removal") def test_xunit_plugin_failtest(self): self.run_and_check('failtest', exit_codes.AVOCADO_TESTS_FAIL, 1, 0, 0, 1, 0) + @unittest.skip("Temporary plugin infrastructure removal") def test_xunit_plugin_skiponsetuptest(self): self.run_and_check('skiponsetup', exit_codes.AVOCADO_ALL_OK, 1, 0, 0, 0, 1) + @unittest.skip("Temporary plugin infrastructure removal") def test_xunit_plugin_errortest(self): self.run_and_check('errortest', exit_codes.AVOCADO_TESTS_FAIL, 1, 1, 0, 0, 0) @@ -724,22 +769,27 @@ class PluginsJSONTest(AbsPluginsTest, unittest.TestCase): "Different number of skipped tests") return json_data + @unittest.skip("Temporary plugin infrastructure removal") def test_json_plugin_passtest(self): self.run_and_check('passtest', exit_codes.AVOCADO_ALL_OK, 1, 0, 0, 0) + @unittest.skip("Temporary plugin infrastructure removal") def test_json_plugin_failtest(self): self.run_and_check('failtest', exit_codes.AVOCADO_TESTS_FAIL, 1, 0, 1, 0) + @unittest.skip("Temporary plugin infrastructure removal") def test_json_plugin_skiponsetuptest(self): self.run_and_check('skiponsetup', exit_codes.AVOCADO_ALL_OK, 1, 0, 0, 1) + @unittest.skip("Temporary plugin infrastructure removal") def test_json_plugin_errortest(self): self.run_and_check('errortest', exit_codes.AVOCADO_TESTS_FAIL, 1, 1, 0, 0) + @unittest.skip("Temporary plugin infrastructure removal") def test_ugly_echo_cmd(self): if not os.path.exists("/bin/echo"): self.skipTest("Program /bin/echo does not exist") diff --git a/selftests/functional/test_export_variables.py b/selftests/functional/test_export_variables.py index 04d6f115..6259ddd0 100644 --- a/selftests/functional/test_export_variables.py +++ b/selftests/functional/test_export_variables.py @@ -1,8 +1,13 @@ import os -import unittest +import sys import tempfile import shutil +if sys.version_info[:2] == (2, 6): + import unittest2 as unittest +else: + import unittest + from avocado import VERSION from avocado.core import exit_codes from avocado.utils import process @@ -44,6 +49,7 @@ class EnvironmentVariablesTest(unittest.TestCase): 'avocado_env_vars_functional') self.script.save() + @unittest.skip("Temporary plugin infrastructure removal") def test_environment_vars(self): os.chdir(basedir) cmd_line = './scripts/avocado run --job-results-dir %s --sysinfo=off %s' % (self.tmpdir, self.script.path) diff --git a/selftests/functional/test_gdb.py b/selftests/functional/test_gdb.py index a6d24100..a5afb1ce 100644 --- a/selftests/functional/test_gdb.py +++ b/selftests/functional/test_gdb.py @@ -1,8 +1,13 @@ import os -import unittest +import sys import shutil import tempfile +if sys.version_info[:2] == (2, 6): + import unittest2 as unittest +else: + import unittest + from avocado.utils import process basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..') @@ -14,12 +19,14 @@ class GDBPluginTest(unittest.TestCase): def setUp(self): self.tmpdir = tempfile.mkdtemp(prefix='avocado_' + __name__) + @unittest.skip("Temporary plugin infrastructure removal") def test_gdb_prerun_commands(self): os.chdir(basedir) cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off ' '--gdb-prerun-commands=/dev/null passtest' % self.tmpdir) process.run(cmd_line) + @unittest.skip("Temporary plugin infrastructure removal") def test_gdb_multiple_prerun_commands(self): os.chdir(basedir) cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off --gdb-prerun-commands=/dev/null ' diff --git a/selftests/functional/test_interrupt.py b/selftests/functional/test_interrupt.py index 74d44761..bc475617 100644 --- a/selftests/functional/test_interrupt.py +++ b/selftests/functional/test_interrupt.py @@ -52,6 +52,7 @@ class InterruptTest(unittest.TestCase): def setUp(self): self.tmpdir = tempfile.mkdtemp(prefix='avocado_' + __name__) + @unittest.skip("Temporary plugin infrastructure removal") def test_badly_behaved(self): """ Make sure avocado can cleanly get out of a loop of badly behaved tests. @@ -111,6 +112,7 @@ class InterruptTest(unittest.TestCase): # Make sure the Killing test subprocess message did appear self.assertIn('Killing test subprocess', proc.get_output()) + @unittest.skip("Temporary plugin infrastructure removal") def test_well_behaved(self): """ Make sure avocado can cleanly get out of a loop of well behaved tests. diff --git a/selftests/functional/test_job_timeout.py b/selftests/functional/test_job_timeout.py index ad9f9fe6..76f0c58d 100644 --- a/selftests/functional/test_job_timeout.py +++ b/selftests/functional/test_job_timeout.py @@ -98,24 +98,28 @@ class JobTimeOutTest(unittest.TestCase): "Unexpected number of test skips, " "XML:\n%s" % xml_output) + @unittest.skip("Temporary plugin infrastructure removal") def test_sleep_longer_timeout(self): cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off ' '--xunit - --job-timeout=5 %s examples/tests/passtest.py' % (self.tmpdir, self.script.path)) self.run_and_check(cmd_line, 0, 2, 0, 0, 0) + @unittest.skip("Temporary plugin infrastructure removal") def test_sleep_short_timeout(self): cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off ' '--xunit - --job-timeout=1 %s examples/tests/passtest.py' % (self.tmpdir, self.script.path)) self.run_and_check(cmd_line, exit_codes.AVOCADO_TESTS_FAIL, 2, 1, 0, 1) + @unittest.skip("Temporary plugin infrastructure removal") def test_sleep_short_timeout_with_test_methods(self): cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off ' '--xunit - --job-timeout=1 %s' % (self.tmpdir, self.py.path)) self.run_and_check(cmd_line, exit_codes.AVOCADO_TESTS_FAIL, 3, 1, 0, 2) + @unittest.skip("Temporary plugin infrastructure removal") def test_invalid_values(self): cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off ' '--job-timeout=0 examples/tests/passtest.py' % self.tmpdir) @@ -128,6 +132,7 @@ class JobTimeOutTest(unittest.TestCase): self.assertEqual(result.exit_status, exit_codes.AVOCADO_FAIL) self.assertIn('Invalid number', result.stderr) + @unittest.skip("Temporary plugin infrastructure removal") def test_valid_values(self): cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off ' '--job-timeout=123 examples/tests/passtest.py' % self.tmpdir) diff --git a/selftests/functional/test_journal.py b/selftests/functional/test_journal.py index caa1e8f3..214af9bb 100644 --- a/selftests/functional/test_journal.py +++ b/selftests/functional/test_journal.py @@ -1,10 +1,15 @@ -import unittest import os +import sys import json import sqlite3 import tempfile import shutil +if sys.version_info[:2] == (2, 6): + import unittest2 as unittest +else: + import unittest + from avocado.core import exit_codes from avocado.utils import process @@ -25,6 +30,7 @@ class JournalPluginTests(unittest.TestCase): jfile = os.path.join(os.path.dirname(data['debuglog']), '.journal.sqlite') self.db = sqlite3.connect(jfile) + @unittest.skip("Temporary plugin infrastructure removal") def test_journal_job_id(self): expected_rc = exit_codes.AVOCADO_ALL_OK self.assertEqual(self.result.exit_status, expected_rc, @@ -36,6 +42,7 @@ class JournalPluginTests(unittest.TestCase): self.assertEqual(db_job_id, self.job_id, "The job ids differs, expected %s got %s" % (self.job_id, db_job_id)) + @unittest.skip("Temporary plugin infrastructure removal") def test_journal_count_entries(self): expected_rc = exit_codes.AVOCADO_ALL_OK self.assertEqual(self.result.exit_status, expected_rc, diff --git a/selftests/functional/test_loader.py b/selftests/functional/test_loader.py index c7209b49..6a8b6706 100644 --- a/selftests/functional/test_loader.py +++ b/selftests/functional/test_loader.py @@ -102,15 +102,19 @@ class LoaderTestFunctional(unittest.TestCase): self.assertIn('%s: %s' % (exp_str, count), result.stdout) test_script.remove() + @unittest.skip("Temporary plugin infrastructure removal") def test_simple(self): self._test('simpletest.sh', SIMPLE_TEST, 'SIMPLE', 0775) + @unittest.skip("Temporary plugin infrastructure removal") def test_simple_not_exec(self): self._test('simpletest.sh', SIMPLE_TEST, 'NOT_A_TEST') + @unittest.skip("Temporary plugin infrastructure removal") def test_pass(self): self._test('passtest.py', AVOCADO_TEST_OK, 'INSTRUMENTED') + @unittest.skip("Temporary plugin infrastructure removal") def test_sleep_a_lot(self): """ Verifies that the test loader, at list time, does not load the Python @@ -132,13 +136,16 @@ class LoaderTestFunctional(unittest.TestCase): "eleven seconds.")) self.assertIn('INSTRUMENTED: 2', result.stdout) + @unittest.skip("Temporary plugin infrastructure removal") def test_multiple_class(self): self._test('multipleclasses.py', AVOCADO_TEST_MULTIPLE_CLASSES, 'INSTRUMENTED', 0664, 2) + @unittest.skip("Temporary plugin infrastructure removal") def test_load_not_a_test(self): self._test('notatest.py', NOT_A_TEST, 'SIMPLE', 0775) + @unittest.skip("Temporary plugin infrastructure removal") def test_load_not_a_test_not_exec(self): self._test('notatest.py', NOT_A_TEST, 'NOT_A_TEST') diff --git a/selftests/functional/test_multiplex.py b/selftests/functional/test_multiplex.py index d033fe5a..9a0b918a 100644 --- a/selftests/functional/test_multiplex.py +++ b/selftests/functional/test_multiplex.py @@ -42,17 +42,20 @@ class MultiplexTests(unittest.TestCase): "%d:\n%s" % (cmd_line, expected_rc, result)) return result + @unittest.skip("Temporary plugin infrastructure removal") def test_mplex_plugin(self): cmd_line = './scripts/avocado multiplex examples/tests/sleeptest.py.data/sleeptest.yaml' expected_rc = exit_codes.AVOCADO_ALL_OK self.run_and_check(cmd_line, expected_rc) + @unittest.skip("Temporary plugin infrastructure removal") def test_mplex_plugin_nonexistent(self): cmd_line = './scripts/avocado multiplex nonexist' expected_rc = exit_codes.AVOCADO_JOB_FAIL result = self.run_and_check(cmd_line, expected_rc) self.assertIn('No such file or directory', result.stderr) + @unittest.skip("Temporary plugin infrastructure removal") def test_mplex_debug(self): cmd_line = ('./scripts/avocado multiplex -c -d ' '/:examples/mux-selftest.yaml ' @@ -63,29 +66,34 @@ class MultiplexTests(unittest.TestCase): result = self.run_and_check(cmd_line, expected_rc) self.assertIn(DEBUG_OUT, result.stdout) + @unittest.skip("Temporary plugin infrastructure removal") def test_run_mplex_noid(self): cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off ' '--multiplex examples/tests/sleeptest.py.data/sleeptest.yaml' % self.tmpdir) expected_rc = exit_codes.AVOCADO_JOB_FAIL self.run_and_check(cmd_line, expected_rc) + @unittest.skip("Temporary plugin infrastructure removal") def test_run_mplex_passtest(self): cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off passtest ' '--multiplex examples/tests/sleeptest.py.data/sleeptest.yaml' % self.tmpdir) expected_rc = exit_codes.AVOCADO_ALL_OK self.run_and_check(cmd_line, expected_rc) + @unittest.skip("Temporary plugin infrastructure removal") def test_run_mplex_doublepass(self): cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off passtest passtest ' '--multiplex examples/tests/sleeptest.py.data/sleeptest.yaml' % self.tmpdir) self.run_and_check(cmd_line, expected_rc=0) + @unittest.skip("Temporary plugin infrastructure removal") def test_run_mplex_failtest(self): cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off passtest failtest ' '--multiplex examples/tests/sleeptest.py.data/sleeptest.yaml' % self.tmpdir) expected_rc = exit_codes.AVOCADO_TESTS_FAIL self.run_and_check(cmd_line, expected_rc) + @unittest.skip("Temporary plugin infrastructure removal") def test_run_double_mplex(self): cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off passtest --multiplex ' 'examples/tests/sleeptest.py.data/sleeptest.yaml ' @@ -93,6 +101,7 @@ class MultiplexTests(unittest.TestCase): expected_rc = exit_codes.AVOCADO_ALL_OK self.run_and_check(cmd_line, expected_rc) + @unittest.skip("Temporary plugin infrastructure removal") def test_run_mplex_params(self): cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off examples/tests/env_variables.sh ' '--multiplex examples/tests/env_variables.sh.data' diff --git a/selftests/functional/test_output.py b/selftests/functional/test_output.py index 139d15dc..9de28379 100644 --- a/selftests/functional/test_output.py +++ b/selftests/functional/test_output.py @@ -32,6 +32,7 @@ class OutputTest(unittest.TestCase): def setUp(self): self.tmpdir = tempfile.mkdtemp(prefix='avocado_' + __name__) + @unittest.skip("Temporary plugin infrastructure removal") def test_output_doublefree(self): os.chdir(basedir) cmd_line = './scripts/avocado run --job-results-dir %s --sysinfo=off doublefree' % self.tmpdir @@ -65,6 +66,7 @@ class OutputPluginTest(unittest.TestCase): self.assertTrue(os.path.isfile(json_output)) minidom.parse(xunit_output) + @unittest.skip("Temporary plugin infrastructure removal") def test_output_incompatible_setup(self): os.chdir(basedir) cmd_line = './scripts/avocado run --job-results-dir %s --sysinfo=off --xunit - --json - passtest' % self.tmpdir @@ -78,6 +80,7 @@ class OutputPluginTest(unittest.TestCase): self.assertIn(error_excerpt, output, "Missing excerpt error message from output:\n%s" % output) + @unittest.skip("Temporary plugin infrastructure removal") def test_output_incompatible_setup_2(self): os.chdir(basedir) cmd_line = './scripts/avocado run --job-results-dir %s --sysinfo=off --html - passtest' % self.tmpdir @@ -91,6 +94,7 @@ class OutputPluginTest(unittest.TestCase): self.assertIn(error_excerpt, output, "Missing excerpt error message from output:\n%s" % output) + @unittest.skip("Temporary plugin infrastructure removal") def test_output_compatible_setup(self): tmpfile = tempfile.mktemp() os.chdir(basedir) @@ -112,6 +116,7 @@ class OutputPluginTest(unittest.TestCase): except OSError: pass + @unittest.skip("Temporary plugin infrastructure removal") def test_output_compatible_setup_2(self): tmpfile = tempfile.mktemp() os.chdir(basedir) @@ -136,6 +141,7 @@ class OutputPluginTest(unittest.TestCase): except OSError: pass + @unittest.skip("Temporary plugin infrastructure removal") def test_output_compatible_setup_3(self): tmpfile = tempfile.mktemp(prefix='avocado_' + __name__) tmpfile2 = tempfile.mktemp(prefix='avocado_' + __name__) @@ -169,6 +175,7 @@ class OutputPluginTest(unittest.TestCase): except OSError: pass + @unittest.skip("Temporary plugin infrastructure removal") def test_output_compatible_setup_nooutput(self): tmpfile = tempfile.mktemp() tmpfile2 = tempfile.mktemp() @@ -196,6 +203,7 @@ class OutputPluginTest(unittest.TestCase): except OSError: pass + @unittest.skip("Temporary plugin infrastructure removal") def test_show_job_log(self): os.chdir(basedir) cmd_line = './scripts/avocado run --job-results-dir %s --sysinfo=off passtest --show-job-log' % self.tmpdir @@ -211,6 +219,7 @@ class OutputPluginTest(unittest.TestCase): job_id = job_id_list[0] self.assertEqual(len(job_id), 40) + @unittest.skip("Temporary plugin infrastructure removal") def test_silent_trumps_show_job_log(self): os.chdir(basedir) cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off passtest --show-job-log --silent' % @@ -223,6 +232,7 @@ class OutputPluginTest(unittest.TestCase): (expected_rc, result)) self.assertEqual(output, "") + @unittest.skip("Temporary plugin infrastructure removal") def test_default_enabled_plugins(self): os.chdir(basedir) cmd_line = './scripts/avocado run --job-results-dir %s --sysinfo=off passtest' % self.tmpdir @@ -242,6 +252,7 @@ class OutputPluginTest(unittest.TestCase): debug_log = second_line.split()[-1] self.check_output_files(debug_log) + @unittest.skip("Temporary plugin infrastructure removal") def test_verify_whiteboard_save(self): tmpfile = tempfile.mktemp() try: @@ -266,6 +277,7 @@ class OutputPluginTest(unittest.TestCase): except OSError: pass + @unittest.skip("Temporary plugin infrastructure removal") @unittest.skipIf(image_output_uncapable(), "Uncapable of generating images with PIL library") def test_gendata(self): @@ -307,6 +319,7 @@ class OutputPluginTest(unittest.TestCase): except OSError: pass + @unittest.skip("Temporary plugin infrastructure removal") def test_redirect_output(self): redirected_output_path = tempfile.mktemp() try: diff --git a/selftests/functional/test_output_check.py b/selftests/functional/test_output_check.py index 8f09eb00..11e3e885 100644 --- a/selftests/functional/test_output_check.py +++ b/selftests/functional/test_output_check.py @@ -32,6 +32,7 @@ class RunnerSimpleTest(unittest.TestCase): 'avocado_output_check_functional') self.output_script.save() + @unittest.skip("Temporary plugin infrastructure removal") def test_output_record_none(self): os.chdir(basedir) cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off %s --output-check-record none' % @@ -46,6 +47,7 @@ class RunnerSimpleTest(unittest.TestCase): self.assertFalse(os.path.isfile(stdout_file)) self.assertFalse(os.path.isfile(stderr_file)) + @unittest.skip("Temporary plugin infrastructure removal") def test_output_record_stdout(self): os.chdir(basedir) cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off %s --output-check-record stdout' % @@ -60,6 +62,7 @@ class RunnerSimpleTest(unittest.TestCase): self.assertTrue(os.path.isfile(stdout_file)) self.assertFalse(os.path.isfile(stderr_file)) + @unittest.skip("Temporary plugin infrastructure removal") def test_output_record_all(self): os.chdir(basedir) cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off %s --output-check-record all' % @@ -74,6 +77,7 @@ class RunnerSimpleTest(unittest.TestCase): self.assertTrue(os.path.isfile(stdout_file)) self.assertTrue(os.path.isfile(stderr_file)) + @unittest.skip("Temporary plugin infrastructure removal") def test_output_record_and_check(self): self.test_output_record_all() cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off %s' % @@ -84,6 +88,7 @@ class RunnerSimpleTest(unittest.TestCase): "Avocado did not return rc %d:\n%s" % (expected_rc, result)) + @unittest.skip("Temporary plugin infrastructure removal") def test_output_tamper_stdout(self): self.test_output_record_all() tampered_msg = "I PITY THE FOOL THAT STANDS ON MY WAY!" @@ -99,6 +104,7 @@ class RunnerSimpleTest(unittest.TestCase): (expected_rc, result)) self.assertIn(tampered_msg, result.stdout) + @unittest.skip("Temporary plugin infrastructure removal") def test_disable_output_check(self): self.test_output_record_all() tampered_msg = "I PITY THE FOOL THAT STANDS ON MY WAY!" diff --git a/selftests/functional/test_sysinfo.py b/selftests/functional/test_sysinfo.py index 16ad6d10..b589bd31 100644 --- a/selftests/functional/test_sysinfo.py +++ b/selftests/functional/test_sysinfo.py @@ -21,6 +21,7 @@ class SysInfoTest(unittest.TestCase): def setUp(self): self.tmpdir = tempfile.mkdtemp(prefix='avocado_' + __name__) + @unittest.skip("Temporary plugin infrastructure removal") def test_sysinfo_enabled(self): os.chdir(basedir) cmd_line = './scripts/avocado run --job-results-dir %s --sysinfo=on passtest' % self.tmpdir @@ -46,6 +47,7 @@ class SysInfoTest(unittest.TestCase): msg = 'The sysinfo/%s subdirectory does not exist:\n%s' % (hook, result) self.assertTrue(os.path.exists(sysinfo_subdir), msg) + @unittest.skip("Temporary plugin infrastructure removal") def test_sysinfo_disabled(self): os.chdir(basedir) cmd_line = './scripts/avocado run --job-results-dir %s --sysinfo=off passtest' % self.tmpdir diff --git a/selftests/functional/test_wrapper.py b/selftests/functional/test_wrapper.py index ecea0073..abf34a89 100644 --- a/selftests/functional/test_wrapper.py +++ b/selftests/functional/test_wrapper.py @@ -1,8 +1,13 @@ import os -import unittest +import sys import tempfile import shutil +if sys.version_info[:2] == (2, 6): + import unittest2 as unittest +else: + import unittest + from avocado.core import exit_codes from avocado.utils import process from avocado.utils import script @@ -37,6 +42,7 @@ class WrapperTest(unittest.TestCase): 'avocado_wrapper_functional') self.dummy.save() + @unittest.skip("Temporary plugin infrastructure removal") def test_global_wrapper(self): os.chdir(basedir) cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off --wrapper %s ' @@ -51,6 +57,7 @@ class WrapperTest(unittest.TestCase): "%s\nCmdline: %s" % (self.tmpfile, result.stdout, cmd_line)) + @unittest.skip("Temporary plugin infrastructure removal") def test_process_wrapper(self): os.chdir(basedir) cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off --wrapper %s:*/datadir ' @@ -65,6 +72,7 @@ class WrapperTest(unittest.TestCase): "%s\nStdout: %s" % (self.tmpfile, cmd_line, result.stdout)) + @unittest.skip("Temporary plugin infrastructure removal") def test_both_wrappers(self): os.chdir(basedir) cmd_line = ('./scripts/avocado run --job-results-dir %s --sysinfo=off --wrapper %s --wrapper %s:*/datadir ' -- GitLab