| 67 | using testing::WithParamInterface; |
| 68 | |
| 69 | int main(int argc, char** argv) |
| 70 | { |
| 71 | // Initialize Google Mock/Test. |
| 72 | testing::InitGoogleMock(&argc, argv); |
| 73 | |
| 74 | // NOTE: Windows does not support signal semantics required for these |
| 75 | // handlers to be useful. |
| 76 | #ifndef __WINDOWS__ |
| 77 | // Install GLOG's signal handler. |
| 78 | google::InstallFailureSignalHandler(); |
| 79 | |
| 80 | // We reset the GLOG's signal handler for SIGTERM because |
| 81 | // 'SubprocessTest.Status' sends SIGTERM to a subprocess which |
| 82 | // results in a stack trace otherwise. |
| 83 | os::signals::reset(SIGTERM); |
| 84 | #endif // __WINDOWS__ |
| 85 | |
| 86 | // Add the libprocess test event listeners. |
| 87 | ::testing::TestEventListeners& listeners = |
| 88 | ::testing::UnitTest::GetInstance()->listeners(); |
| 89 | |
| 90 | listeners.Append(process::ClockTestEventListener::instance()); |
| 91 | listeners.Append(process::FilterTestEventListener::instance()); |
| 92 | |
| 93 | int result = RUN_ALL_TESTS(); |
| 94 | |
| 95 | process::finalize(true); |
| 96 | return result; |
| 97 | } |
| 98 | |
| 99 | // TODO(jmlvanre): Factor out the client / server behavior so that we |
| 100 | // can make separate binaries for the client and server. This is |