whimsy.gem5 package¶
Submodules¶
whimsy.gem5.fixture module¶
-
class
whimsy.gem5.fixture.
MakeFixture
(directory, *args, **kwargs)[source]¶ Bases:
whimsy.fixture.Fixture
-
class
whimsy.gem5.fixture.
MakeTarget
(target, make_fixture=None, *args, **kwargs)[source]¶ Bases:
whimsy.fixture.Fixture
-
class
whimsy.gem5.fixture.
SConsFixture
(name='SCons Fixture', directory=None, *args, **kwargs)[source]¶ Bases:
whimsy.fixture.Fixture
Fixture will wait until all SCons targets are collected and tests are about to be ran, then will invocate a single instance of SCons for all targets.
Parameters: directory – The directory which scons will -C (cd) into before executing. If None is provided, will choose the config base_dir. -
setup
(*args, **kwds)¶
-
-
class
whimsy.gem5.fixture.
SConsTarget
(target, build_dir=None, invocation=None, *args, **kwargs)[source]¶ Bases:
whimsy.fixture.Fixture
-
default_scons_invocation
= None¶
-
-
class
whimsy.gem5.fixture.
TempdirFixture
(name=None, **kwargs)[source]¶ Bases:
whimsy.fixture.Fixture
-
default_name
= 'tempdir'¶
-
-
class
whimsy.gem5.fixture.
VariableFixture
(value=None, name=None)[source]¶ Bases:
whimsy.fixture.Fixture
whimsy.gem5.suite module¶
-
whimsy.gem5.suite.
gem5_verify_config
(name, config, config_args, verifiers, gem5_args=(), tags=[], fixtures=[], valid_isas=('X86', 'SPARC', 'ALPHA', 'RISCV', 'ARM'), valid_optimizations=('opt', 'debug', 'fast'))[source]¶ Helper class to generate common gem5 tests using verifiers.
The generated TestSuite will run gem5 with the provided config and config_args. After that it will run any provided verifiers to verify details about the gem5 run.
See also
For the verifiers see
whimsy.gem5.verifier
Parameters: - name – Name of the test.
- config – The config to give gem5.
- config_args – A list of arguments to pass to the given config.
- verifiers – An iterable with Verifier instances which will be placed into a suite that will be ran after a gem5 run.
- gem5_args – An iterable with arguments to give to gem5. (Arguments that would normally go before the config path.)
- valid_isas – An interable with the isas that this test can be ran for. If None given, will run for all supported_isas.
- valid_optimizations – An interable with the optimization levels that this test can be ran for. (E.g. opt, debug)
whimsy.gem5.verifier module¶
Built in test cases that verify particular details about a gem5 run.
-
class
whimsy.gem5.verifier.
DerivedGoldStandard
(standard_filename, ignore_regex=<object object>, **kwargs)[source]¶
-
class
whimsy.gem5.verifier.
MatchConfigINI
(standard_filename, ignore_regex=<object object>, **kwargs)[source]¶
-
class
whimsy.gem5.verifier.
MatchConfigJSON
(standard_filename, ignore_regex=<object object>, **kwargs)[source]¶
-
class
whimsy.gem5.verifier.
MatchGoldStandard
(standard_filename, name=None, ignore_regex=None, test_filename='simout')[source]¶ Bases:
whimsy.gem5.verifier.Verifier
Compares a standard output to the test output and passes if they match, fails if they do not.
-
class
whimsy.gem5.verifier.
MatchRegex
(regex, name=None, match_stderr=True, match_stdout=True)[source]¶
-
class
whimsy.gem5.verifier.
MatchStats
(standard_filename, ignore_regex=<object object>, **kwargs)[source]¶
-
class
whimsy.gem5.verifier.
MatchStderr
(standard_filename, ignore_regex=<object object>, **kwargs)[source]¶
-
class
whimsy.gem5.verifier.
MatchStdout
(standard_filename, ignore_regex=<object object>, **kwargs)[source]¶
-
class
whimsy.gem5.verifier.
Verifier
(name=None, **kwargs)[source]¶ Bases:
whimsy.test.TestFunction