-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Hello,
I'd like to start by saying that since I switched from GoogleTest to GUnit, I have come to really enjoy its clarity and conciseness, so thanks for everything. I never looked back, until this week...
I work in HPC and I'd like to use GUnit for tests where the application is distributed over multiple processes using MPI. Unsurprisingly, this does not work out of the box, as one process might pass a test while another fails the same test, leading to inconsistent results. I know there are solutions that exist out there (for example https://github.com/DLR-SC/googletest_mpi), but I really wish I could avoid going back to using GoogleTest.
After some investigation, I figured that if I could retrieve the success/failure status of a test, then I could easily solve my problem:
GTEST( "Some test running in a distributed environment ){
// All the usual stuff with assertions etc.
bool test_is_successful = ... ; // this is the thing I'd need
MPI_Allreduce( &test_is_successful, ..., MPI_LAND, ... ); // Logical and reduction across all processes
EXPECT( test_is_successful ); // Check that all processes succeded
}Do you think there is a way to make something like that work?
Best regards,
Alex