Added GLOG signal handler to print stack traces on segfault in stout. Review: https://reviews.apache.org/r/24675
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d665e526 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d665e526 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d665e526 Branch: refs/heads/master Commit: d665e526d897629a4f43f8893c278bd48bc1b989 Parents: 788d3a6 Author: Vinod Kone <[email protected]> Authored: Wed Aug 13 15:31:06 2014 -0700 Committer: Vinod Kone <[email protected]> Committed: Wed Aug 13 15:54:57 2014 -0700 ---------------------------------------------------------------------- 3rdparty/libprocess/3rdparty/stout/tests/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/d665e526/3rdparty/libprocess/3rdparty/stout/tests/main.cpp ---------------------------------------------------------------------- diff --git a/3rdparty/libprocess/3rdparty/stout/tests/main.cpp b/3rdparty/libprocess/3rdparty/stout/tests/main.cpp index 0f1e9cb..75dbfec 100644 --- a/3rdparty/libprocess/3rdparty/stout/tests/main.cpp +++ b/3rdparty/libprocess/3rdparty/stout/tests/main.cpp @@ -1,11 +1,17 @@ -#include <gtest/gtest.h> +#include <glog/logging.h> #include <gmock/gmock.h> +#include <gtest/gtest.h> + int main(int argc, char** argv) { // Initialize Google Mock/Test. testing::InitGoogleMock(&argc, argv); + // Handles SIGSEGV, SIGILL, SIGFPE, SIGABRT, SIGBUS, SIGTERM + // by default. + google::InstallFailureSignalHandler(); + return RUN_ALL_TESTS(); }
