e3.testsuite.control

Classes

TestControlKind

Control how to run (or not!) testcases.

TestControl

Control the execution and analysis of a testcase.

TestControlCreator

Abstract class to create test controls.

YAMLTestControlCreator

Create test controls from "test.yaml"'s "control" entries.

AdaCoreLegacyTestControlCreator

Create test controls for "test.opt"-based legacy AdaCore testsuites.

Module Contents

class e3.testsuite.control.TestControlKind(*args, **kwds)

Bases: enum.Enum

Control how to run (or not!) testcases.

NONE = 0

Run the test the regular way.

SKIP = 1

Do not run the testcase, setting it SKIP.

XFAIL = 2

Run the test the regular way. If its status is PASS, correct it to XPASS. If it succeeds, correct it to XFAIL. Leave its status unchanged in other cases.

class e3.testsuite.control.TestControl(message: str | None = None, skip: bool = False, xfail: bool = False)

Control the execution and analysis of a testcase.

skip = False
xfail = False
message = None
opt_results: Dict[str, Any] | None = None
class e3.testsuite.control.TestControlCreator

Abstract class to create test controls.

abstractmethod create(driver: e3.testsuite.driver.TestDriver) TestControl

Create a TestControl instance for the given test driver.

Raise a ValueError exception if the configuration is invalid.

Parameters:

driver – Test driver for which we must parse the “control” configuration.

class e3.testsuite.control.YAMLTestControlCreator(condition_env: Dict[str, Any] | None = None)

Bases: TestControlCreator

Create test controls from “test.yaml“‘s “control” entries.

condition_env
create(driver: e3.testsuite.driver.TestDriver) TestControl

Create a TestControl instance for the given test driver.

Raise a ValueError exception if the configuration is invalid.

Parameters:

driver – Test driver for which we must parse the “control” configuration.

class e3.testsuite.control.AdaCoreLegacyTestControlCreator(system_tags: List[str], opt_filename: str = 'test.opt')

Bases: TestControlCreator

Create test controls for “test.opt”-based legacy AdaCore testsuites.

default_script(driver: e3.testsuite.driver.TestDriver) str

Return the default test script filename.

Parameters:

driver – Test driver for which we must parse the “control” configuration.

default_opt_results(driver: e3.testsuite.driver.TestDriver) Dict[str, str | None]

Return the default options. test.opt files can override these.

By default, a test is not DEAD, SKIP, nor XFAIL. Its execution timeout is 780 seconds. Test script is “test.cmd” and its output is compared against “test.out”.

Parameters:

driver – Test driver for which we must parse the “control” configuration.

opt_filename = 'test.opt'
system_tags
create(driver: e3.testsuite.driver.TestDriver) TestControl

Create a TestControl instance for the given test driver.

Raise a ValueError exception if the configuration is invalid.

Parameters:

driver – Test driver for which we must parse the “control” configuration.