![]() |
OGS
|
|
Definition at line 20 of file TestDefinition.h.
#include <TestDefinition.h>
Classes | |
| struct | CommandLine |
Public Member Functions | |
| TestDefinition (BaseLib::ConfigTree const &config_tree, std::string const &reference_path, std::string const &output_directory) | |
| OGS_EXPORT_SYMBOL bool | runTests () const |
| Runs all configured test command lines. | |
| OGS_EXPORT_SYMBOL bool | runTests (std::string_view diff_tool_name) const |
| Runs only test command lines for the given diff tool. | |
| OGS_EXPORT_SYMBOL bool | runTestsExcluding (std::string_view diff_tool_name) const |
| Runs all test command lines except those for the given diff tool. | |
| OGS_EXPORT_SYMBOL bool | hasTests (std::string_view diff_tool_name) const |
| Returns true if at least one test command line uses the given diff tool. | |
| std::vector< std::string > const & | getOutputFiles () const |
| Returns all output files referenced by the configured test definitions. | |
| std::size_t | numberOfTests () const |
| Returns the number of configured test command lines. | |
Static Private Member Functions | |
| static bool | runCommandLines (std::vector< CommandLine > const &command_lines, bool fail_on_empty) |
Private Attributes | |
| std::vector< CommandLine > | _command_lines |
| std::vector< std::string > | _output_files |
| ApplicationsLib::TestDefinition::TestDefinition | ( | BaseLib::ConfigTree const & | config_tree, |
| std::string const & | reference_path, | ||
| std::string const & | output_directory ) |
Constructs test definition from the config and reference path essentially constructing the command lines to be run on run() function call.
Definition at line 200 of file TestDefinition.cpp.
References _command_lines, _output_files, DBUG(), BaseLib::ConfigTree::getConfigSubtreeList(), MeshLib::IO::getVtuFileNameForPetscOutputWithoutExtension(), INFO(), BaseLib::joinPaths(), OGS_FATAL, BaseLib::MPI::Mpi::rank, and BaseLib::MPI::Mpi::size.
| std::vector< std::string > const & ApplicationsLib::TestDefinition::getOutputFiles | ( | ) | const |
Returns all output files referenced by the configured test definitions.
Definition at line 444 of file TestDefinition.cpp.
References _output_files.
| bool ApplicationsLib::TestDefinition::hasTests | ( | std::string_view | diff_tool_name | ) | const |
Returns true if at least one test command line uses the given diff tool.
Definition at line 411 of file TestDefinition.cpp.
References _command_lines, and ApplicationsLib::TestDefinition::CommandLine::diff_tool_name.
| std::size_t ApplicationsLib::TestDefinition::numberOfTests | ( | ) | const |
Returns the number of configured test command lines.
Definition at line 449 of file TestDefinition.cpp.
References _command_lines.
|
staticprivate |
Definition at line 418 of file TestDefinition.cpp.
References ApplicationsLib::TestDefinition::CommandLine::command_line, ApplicationsLib::TestDefinition::CommandLine::diff_tool_name, INFO(), and WARN().
Referenced by runTests(), runTests(), and runTestsExcluding().
| bool ApplicationsLib::TestDefinition::runTests | ( | ) | const |
Runs all configured test command lines.
Definition at line 383 of file TestDefinition.cpp.
References _command_lines, and runCommandLines().
| bool ApplicationsLib::TestDefinition::runTests | ( | std::string_view | diff_tool_name | ) | const |
Runs only test command lines for the given diff tool.
Definition at line 388 of file TestDefinition.cpp.
References _command_lines, ApplicationsLib::TestDefinition::CommandLine::diff_tool_name, and runCommandLines().
| bool ApplicationsLib::TestDefinition::runTestsExcluding | ( | std::string_view | diff_tool_name | ) | const |
Runs all test command lines except those for the given diff tool.
Definition at line 399 of file TestDefinition.cpp.
References _command_lines, ApplicationsLib::TestDefinition::CommandLine::diff_tool_name, and runCommandLines().
|
private |
Definition at line 59 of file TestDefinition.h.
Referenced by TestDefinition(), hasTests(), numberOfTests(), runTests(), runTests(), and runTestsExcluding().
|
private |
Definition at line 60 of file TestDefinition.h.
Referenced by TestDefinition(), and getOutputFiles().