- class acoretests.generic_tests.GenericTests(**kwargs)
Generic Test entity for A-Core. Called from command line. Runs all tests provided in
test_configs, composes results, throws an error if any test fails.Example
python3 generic_tests.py --help
Parameters
- test_configslist
List of paths to test configs. Wildcards supported.
- only_selfcheckingbool
Filter out all tests that have not been marked as selfchecking
- allowed_to_faillist
List of test names that are allowed to fail. By default, test name is the base name of test config. The test result will be visible in the results, but it does not throw an error.
- sim_configstr
Path to sim_config. If left empty, the sim_config defined in the test_config will be used.
- init(**kwargs)
Initialize everything. Testbenches are stored into
self.tbs. It runs ACoreTestConfig, and imports dynamically the correct testbench class. It runs theinitfunction for the selected testbench. After this, the testbenches are stored inself.tbs.
- init_props(**kwargs)
Initialize properties that come from CLI. sim_config argument is used to replace sim_config_yaml in all test_configs.
- parse_configs()
Collect all provided test config paths into a list. The paths are collected into
self._test_configs.This function also checks for certain conditions, such as selfchecking. If the program was run with only_selfchecking option, those tests that have
selfchecking: falseare filtered out.
- run()
Run tests. Compose results, and print them after all tests have finished.
Raises
- TestFailError
If some test(s) failed
- run_sequential()
Run testbenches sequentially
- class acoretests.acoretests_cli.ACoreTestsCLI(name)
Command-line interface for running tests for A-Core.
Parameters
- namestr
Name of the program. This will show as the execution command in the help string.
- build_cli()
Build command-line interface.
- property cli_args: Namespace
Parsed command line arguments
- property kwargs: dict
Parsed keyword arguments
- str2bool(v)
Helper for parsing boolean values