ALPSCore reference
|
Functor class to tweak (argc,argv). More...
#include <gtest_par_xml_output.hpp>
Public Member Functions | |
virtual | ~gtest_par_xml_output () |
void | operator() (unsigned int irank, int argc, char **argv) |
Tweaks (argc,argv) to redirect GTest XML output to different files. More... | |
Functor class to tweak (argc,argv).
Its intended use is for unit tests that use Google Test and are run in parallel via MPI. Suggested use:
int main(int argc, char**argv) { alps::mpi::environment env(argc, argv); gtest_par_xml_output tweak; // holds the memory tweak(argc, argv, alps::mpi::communicator().rank() ); // does tweaking ::testing::InitGoogleTest(&argc, argv);
..... destructor releases the memory }
Definition at line 31 of file gtest_par_xml_output.hpp.
|
virtual |
Definition at line 48 of file gtest_par_xml_output.cpp.
void alps::gtest_par_xml_output::operator() | ( | unsigned int | irank, |
int | argc, | ||
char ** | argv | ||
) |
Tweaks (argc,argv) to redirect GTest XML output to different files.
irank | : A number added to XML output file name (usually, MPI rank) |
argc | : main()'s argc |
argv | : main()'s argv |
This method scans argv[] for '–gtest=xml' argument and tweaks it by adding irank to the output file name (preserving the last extension, if any).
Definition at line 15 of file gtest_par_xml_output.cpp.