[SmokeTest] Add SIGINT and SIGSEGV handling
[platform/core/appfw/wgt-backend.git] / src / unit_tests / smoke_test.cc
index 38c2b01..9b90c2a 100644 (file)
@@ -3,10 +3,8 @@
 // found in the LICENSE file.
 
 #include <common/utils/subprocess.h>
-
 #include <common/utils/file_util.h>
 
-#include <gtest/gtest.h>
 #include <gtest/gtest-death-test.h>
 
 #include "unit_tests/smoke_utils.h"
@@ -711,7 +709,9 @@ int main(int argc,  char** argv) {
     ::testing::GTEST_FLAG(filter) = "SmokeTest.*";
   }
   testing::InitGoogleTest(&argc, argv);
-  testing::Environment *env = testing::AddGlobalTestEnvironment(
+  env = testing::AddGlobalTestEnvironment(
       new common_installer::SmokeEnvironment(request_mode));
+  signal(SIGINT, signalHandler);
+  signal(SIGSEGV, signalHandler);
   return RUN_ALL_TESTS();
 }