|
gem5 [DEVELOP-FOR-25.0]
|
Fixture class that handles temporary directory creation. More...
#include <serialization_fixture.hh>
Public Member Functions | |
| std::string | getDirName () const |
| Get the name of the directory we have created on SetUp. | |
| std::string | getCptPath () const |
| Get the path to the checkpoint file. | |
| void | simulateSerialization (std::string contents) const |
| Create a cpt file with the contents specified by the string. | |
| void | SetUp () override |
| void | TearDown () override |
Private Attributes | |
| std::string | dirName = "/tmp/temp_dir_test_XXXXXX" |
| The name of the temporary directory. | |
Fixture class that handles temporary directory creation.
These temporary directories are used by the tests in this file, in order to avoid that a failed test will not remove its directory, causing future runs to fail. This has been tailored for checkpoints, so it expects that the directory may contain a cpt file on removal.
Definition at line 53 of file serialization_fixture.hh.
|
inline |
Get the path to the checkpoint file.
Definition at line 67 of file serialization_fixture.hh.
References gem5::CheckpointIn::baseFilename, and getDirName().
Referenced by CheckpointInFixture::SetUp(), SerializableFixture::SetUp(), simulateSerialization(), TearDown(), and SerializableFixture::TearDown().
|
inline |
Get the name of the directory we have created on SetUp.
Definition at line 63 of file serialization_fixture.hh.
References dirName.
Referenced by getCptPath(), and SerializableFixture::SetUp().
|
inlineoverride |
Definition at line 86 of file serialization_fixture.hh.
References dirName.
Referenced by CheckpointInFixture::SetUp(), and SerializableFixture::SetUp().
|
inline |
Create a cpt file with the contents specified by the string.
This function should be used when testing unserialization, since it simulates a previous serialization.
Definition at line 78 of file serialization_fixture.hh.
References gem5::X86ISA::contents, and getCptPath().
|
inlineoverride |
Definition at line 94 of file serialization_fixture.hh.
References dirName, and getCptPath().
Referenced by SerializableFixture::TearDown().
|
private |
The name of the temporary directory.
Definition at line 57 of file serialization_fixture.hh.
Referenced by getDirName(), SetUp(), and TearDown().