-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ctest runs all tests now, instead all suites, shows more details
- Loading branch information
Showing
2 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include "coupling/CouplingMDDefinitions.h" | ||
#if (COUPLING_MD_PARALLEL == COUPLING_MD_YES) | ||
#include <mpi.h> | ||
#endif | ||
#include <cppunit/Test.h> | ||
#include <cppunit/TestSuite.h> | ||
#include <cppunit/extensions/TestFactoryRegistry.h> | ||
|
||
/*** | ||
* | ||
* Prints testPath of all tests to stdout, for use by cmake | ||
* | ||
* @author Piet | ||
* Nov 2023 | ||
* | ||
*/ | ||
int main(int argc, char** argv) { | ||
#if (COUPLING_MD_PARALLEL == COUPLING_MD_YES) | ||
MPI_Init(&argc, &argv); | ||
#endif | ||
|
||
CppUnit::TestSuite* all = dynamic_cast<CppUnit::TestSuite*>(CppUnit::TestFactoryRegistry::getRegistry().makeTest()); | ||
auto suites = all->getTests(); | ||
for (auto s : suites) { | ||
auto suite = dynamic_cast<CppUnit::TestSuite*>(s); | ||
auto tests = suite->getTests(); | ||
for (auto test : tests) | ||
std::cout << test->getName() << " "; | ||
} | ||
|
||
std::cout << std::endl; | ||
|
||
#if (COUPLING_MD_PARALLEL == COUPLING_MD_YES) | ||
MPI_Finalize(); | ||
#endif | ||
return 0; | ||
} |