From 2fe64d41fa04d6e872e823ab1f0a12aa1c916103 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Sun, 3 Mar 2024 18:27:11 -0500 Subject: [PATCH] Remove simpletest.* settings The "SIMPLE" test is a legacy runner terminology, and while most of its features were migrated to "exec-test", theses simpletest.* settings were not. Let's drop the settings and a test which currently accomplishes nothing. Signed-off-by: Cleber Rosa --- avocado/core/__init__.py | 54 ----------------------------------- selftests/check.py | 2 +- selftests/functional/basic.py | 31 -------------------- 3 files changed, 1 insertion(+), 86 deletions(-) diff --git a/avocado/core/__init__.py b/avocado/core/__init__.py index 9dd768e8a8..3120a35dbe 100644 --- a/avocado/core/__init__.py +++ b/avocado/core/__init__.py @@ -47,60 +47,6 @@ def register_core_options(): help_msg=help_msg, ) - help_msg = ( - "Python regular expression that will make the test status WARN when matched." - ) - stgs.register_option( - section="simpletests.status", - key="warn_regex", - default="^WARN$", - help_msg=help_msg, - ) - - help_msg = ( - "Location to search the regular expression on. " - "Accepted values: all, stdout, stderr." - ) - stgs.register_option( - section="simpletests.status", - key="warn_location", - default="all", - help_msg=help_msg, - ) - - help_msg = ( - "Python regular expression that will make the test status SKIP when matched." - ) - stgs.register_option( - section="simpletests.status", - key="skip_regex", - default="^SKIP$", - help_msg=help_msg, - ) - - help_msg = ( - "Location to search the regular expression on. " - "Accepted values: all, stdout, stderr." - ) - stgs.register_option( - section="simpletests.status", - key="skip_location", - default="all", - help_msg=help_msg, - ) - - help_msg = ( - "Fields to include in the presentation of executable test " - "failures. Accepted values: status, stdout, stderr." - ) - stgs.register_option( - section="simpletests.status", - key="failure_fields", - key_type=list, - default=["status", "stdout", "stderr"], - help_msg=help_msg, - ) - help_msg = ( "The amount of time to wait between asking nicely for a task " "to be terminated (say sending a signal) and proceeding with " diff --git a/selftests/check.py b/selftests/check.py index d6d6a35eeb..5193281774 100755 --- a/selftests/check.py +++ b/selftests/check.py @@ -29,7 +29,7 @@ "nrunner-requirement": 16, "unit": 667, "jobs": 11, - "functional-parallel": 302, + "functional-parallel": 301, "functional-serial": 4, "optional-plugins": 0, "optional-plugins-golang": 2, diff --git a/selftests/functional/basic.py b/selftests/functional/basic.py index f5d2049ae7..86e67fbc9f 100644 --- a/selftests/functional/basic.py +++ b/selftests/functional/basic.py @@ -13,7 +13,6 @@ from avocado.utils import process, script from selftests.utils import ( AVOCADO, - BASEDIR, TestCaseTmpDir, python_module_available, skipOnLevelsInferiorThan, @@ -1127,36 +1126,6 @@ def tearDown(self): self.config_file.remove() -class RunnerExecTestFailureFields(TestCaseTmpDir): - def setUp(self): - super().setUp() - self.config_file = script.TemporaryScript( - "avocado.conf", - "[simpletests.status]\nfailure_fields = ['stdout', 'stderr']\n", - ) - self.config_file.save() - - def test_exec_test_failure_fields(self): - fail_test = os.path.join(BASEDIR, "examples", "tests", "failtest.sh") - cmd_line = ( - f"{AVOCADO} --config {self.config_file.path} run " - f"--job-results-dir {self.tmpdir.name} " - f"--disable-sysinfo -- {fail_test}" - ) - result = process.run(cmd_line, ignore_status=True) - expected_rc = exit_codes.AVOCADO_TESTS_FAIL - self.assertEqual( - result.exit_status, - expected_rc, - f"Avocado did not return rc {expected_rc}:\n{result}", - ) - self.assertNotIn("Exited with status: '1'", result.stdout_text) - - def tearDown(self): - super().tearDown() - self.config_file.remove() - - class PluginsTest(TestCaseTmpDir): def test_sysinfo_plugin(self): cmd_line = f"{AVOCADO} sysinfo {self.tmpdir.name}"