Skip to content

Commit

Permalink
Remove simpletest.* settings
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
clebergnu committed Mar 3, 2024
1 parent a4dcd5c commit 2fe64d4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 86 deletions.
54 changes: 0 additions & 54 deletions avocado/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down
2 changes: 1 addition & 1 deletion selftests/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
31 changes: 0 additions & 31 deletions selftests/functional/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from avocado.utils import process, script
from selftests.utils import (
AVOCADO,
BASEDIR,
TestCaseTmpDir,
python_module_available,
skipOnLevelsInferiorThan,
Expand Down Expand Up @@ -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}"
Expand Down

0 comments on commit 2fe64d4

Please sign in to comment.