} // namespace smoke_test
int main(int argc, char** argv) {
- ci::RequestMode request_mode = smoke_test::ParseRequestMode(argc, argv);
- if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) {
- std::cout << "Skip tests for preload request" << std::endl;
- ::testing::GTEST_FLAG(filter) = "SmokeTest.*";
+ try {
+ ci::RequestMode request_mode = smoke_test::ParseRequestMode(argc, argv);
+ if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) {
+ std::cout << "Skip tests for preload request" << std::endl;
+ ::testing::GTEST_FLAG(filter) = "SmokeTest.*";
+ }
+ testing::InitGoogleTest(&argc, argv);
+ ::env = static_cast<smoke_test::SmokeEnvironment*>(
+ testing::AddGlobalTestEnvironment(
+ new smoke_test::SmokeEnvironment(request_mode)));
+ signal(SIGINT, ::signalHandler);
+ signal(SIGSEGV, ::signalHandler);
+ return RUN_ALL_TESTS();
+ } catch (...) {
+ std::cout << "Exception occurred during testing" << std::endl;
+ return 1;
}
- testing::InitGoogleTest(&argc, argv);
- ::env = static_cast<smoke_test::SmokeEnvironment*>(
- testing::AddGlobalTestEnvironment(
- new smoke_test::SmokeEnvironment(request_mode)));
- signal(SIGINT, ::signalHandler);
- signal(SIGSEGV, ::signalHandler);
- return RUN_ALL_TESTS();
}
} // namespace smoke_test
int main(int argc, char** argv) {
- ci::RequestMode request_mode = st::ParseRequestMode(argc, argv);
- if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) {
- std::cout << "Skip tests for preload request" << std::endl;
- ::testing::GTEST_FLAG(filter) = "SmokeTest.*";
+ try {
+ ci::RequestMode request_mode = st::ParseRequestMode(argc, argv);
+ if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) {
+ std::cout << "Skip tests for preload request" << std::endl;
+ ::testing::GTEST_FLAG(filter) = "SmokeTest.*";
+ }
+ testing::InitGoogleTest(&argc, argv);
+ ::env = static_cast<smoke_test::SmokeEnvironment*>(
+ testing::AddGlobalTestEnvironment(
+ new smoke_test::SmokeEnvironment(request_mode)));
+ signal(SIGINT, ::signalHandler);
+ signal(SIGSEGV, ::signalHandler);
+ return RUN_ALL_TESTS();
+ } catch (...) {
+ std::cout << "Exception occurred during testing" << std::endl;
+ return 1;
}
- testing::InitGoogleTest(&argc, argv);
- ::env = static_cast<smoke_test::SmokeEnvironment*>(
- testing::AddGlobalTestEnvironment(
- new smoke_test::SmokeEnvironment(request_mode)));
- signal(SIGINT, ::signalHandler);
- signal(SIGSEGV, ::signalHandler);
- return RUN_ALL_TESTS();
}