Support for real MPI unit tests
authorTeemu Murtola <teemu.murtola@gmail.com>
Fri, 13 May 2016 03:38:49 +0000 (06:38 +0300)
committerMark Abraham <mark.j.abraham@gmail.com>
Wed, 25 May 2016 14:39:46 +0000 (16:39 +0200)
commitf86688b5365398440ed943d9a30bfa699d24d487
tree8301e012cd2cad8d205c828116af4080f45c0ff5
parenta76fa4631f89738897556e360c0b9d790527d59c
Support for real MPI unit tests

Add support for unit tests where the same test code can be run under
both MPI and thread-MPI with a specified number of ranks.
Currently, all tests within the same binary should use the same number
of ranks.

Some C++11 magic is used to get a function pointer to the current test
body, but it seems to work with all the compilers in Jenkins.
Without it, the implementation would either be much more complicated, or
would require a specific fixture type for these tests.

Change-Id: I2957c4cc17cae85bfa2ecf36624160257a17cae3
src/external/gmock-1.7.0/CMakeLists.txt
src/programs/mdrun/tests/moduletest.cpp
src/testutils/CMakeLists.txt
src/testutils/TestMacros.cmake
src/testutils/mpitest.cpp [new file with mode: 0644]
src/testutils/mpitest.h [new file with mode: 0644]
src/testutils/tests/CMakeLists.txt
src/testutils/tests/mpitest.cpp [new file with mode: 0644]