Object for parsing as well as storing environment and command-line input relevant to unit testing (Test Driven Development) in STORMM. Environment variables will be sought, but command-line inputs addressing the same information will take precedence.
More...
|
| ~TestEnvironment () |
| Destructor for the TestEnvironment object must delete the temporary directory if it was created by the constructor. This can only be done after STORMM removes files in the temporary directory known to have been created by the program itself. The actual directory removal is accomplished by a syscall to /bin/rmdir, which will not delete a directory with contents still in it. In this way, the temporary directory can be removed safely without destroying valuable work left by some other user or program.
|
|
TestVerbosity | getVerbosity () const |
| Get the verbosity level requested for this test environment.
|
|
double | getTolerance () const |
| Get the general tolerance that can be applied in blanket fashion across many tests. This is most useful for regression tests or much higher-level unit tests, as low-level unit test results are often known to very high precision.
|
|
int | getRandomSeed () const |
| Get the random seed from the test environment. Separate random seeds can be supplied to any random number generator object at the developer's discretion.
|
|
std::string | getStormmHomePath () const |
| Get the STORMM home (test executable and installed library) path.
|
|
std::string | getStormmSourcePath () const |
| Get the STORMM source root path.
|
|
std::string | getTemporaryDirectoryPath () const |
| Get the temporary directory path that the test environment can use to store files.
|
|
bool | getTemporaryDirectoryAccess () const |
| Check whether the temporary directory is accessible to the program.
|
|
bool | doIntensiveTests () const |
| Get the directives as to intensive unit test execution.
|
|
std::vector< std::string > | getListOfFilesCreated () const |
| Get the list of files that this test program has been given responsibility. It will assume that these files are things it created temporarily and that they should be removed when the TestEnvironment object falls out of scope.
|
|
SnapshotOperation | takeSnapshot () const |
| Return whether to record a snapshot of the current data into the named file, or compare the data to an existing file.
|
|
bool | getDisplayTimingsOrder () const |
| Return the directive on displaying timings at the end of a test program.
|
|
void | setFileRemoval (const bool remove_files_in) |
| Set the file removal flag.
|
|
void | logFileCreated (const std::string &path) |
| Catalog that a file has been created by the program. This function will not actually check that the file was created by code recently executed; it just serves as a way to accumulate a list of files that should be regarded as the property of whatever program using the STORMM TestEnvironment object. The program will, however, detect whether an absolute path is in use and make the path absolute if not.
|
|
|
| TestEnvironment (int argc, const char *argv[], CommandLineParser *clip, TmpdirStatus tmpdir_required=TmpdirStatus::NOT_REQUIRED, ExceptionResponse policy=ExceptionResponse::WARN) |
| The TestEnvironment constructor takes command line arguments but also searches for native environment variables.
|
|
| TestEnvironment (int argc, const char *argv[], TmpdirStatus tmpdir_required=TmpdirStatus::NOT_REQUIRED, ExceptionResponse policy=ExceptionResponse::WARN) |
|
| TestEnvironment (int argc, const char *argv[], ExceptionResponse policy) |
|
|
void | logDirectoryCreated (const std::string &path) |
| Catalog that a directory has been created by the program. As above, this function will take the developer at their word and accumulates a list of directories that should be regarded as the property of the TestEnvironment object and removed, if possible, when the object is destroyed.
|
|
void | logDirectoryCreated (const std::vector< std::string > &paths) |
|
Object for parsing as well as storing environment and command-line input relevant to unit testing (Test Driven Development) in STORMM. Environment variables will be sought, but command-line inputs addressing the same information will take precedence.