diff options
author | lokilee73 <changjoo.lee@samsung.com> | 2018-08-28 16:34:35 +0900 |
---|---|---|
committer | lokilee73 <changjoo.lee@samsung.com> | 2018-08-28 16:34:40 +0900 |
commit | 36885f887f3e36851b0b7421563d05c22ba6fc3d (patch) | |
tree | 943f6d937951f74e3138feb7b2d03cdabd33e987 | |
parent | 6f31fedb77fc2f61b7e7c560a980a046bf062cc6 (diff) | |
download | libdevice-node-36885f887f3e36851b0b7421563d05c22ba6fc3d.tar.gz libdevice-node-36885f887f3e36851b0b7421563d05c22ba6fc3d.tar.bz2 libdevice-node-36885f887f3e36851b0b7421563d05c22ba6fc3d.zip |
Add exception handle for HAL testsubmit/tizen/20180828.075148accepted/tizen/unified/20180828.181916
Change-Id: Ifbfa3fd48e57debb70a4f9f6e3954f46c29ecdd7
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
-rwxr-xr-x | unittest/device_haltests.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/unittest/device_haltests.cpp b/unittest/device_haltests.cpp index e45533b..71d189f 100755 --- a/unittest/device_haltests.cpp +++ b/unittest/device_haltests.cpp @@ -1104,7 +1104,20 @@ TEST_F(USBGADGETHalTest, DeinitP) int main(int argc, char **argv) { - testing::InitGoogleTest(&argc, argv); + int ret = -1; - return RUN_ALL_TESTS(); + try { + testing::InitGoogleTest(&argc, argv); + } catch(...) { + std::cout << "Exception occurred." << std::endl; + } + + try { + ret = RUN_ALL_TESTS(); + } catch (const ::testing::internal::GoogleTestFailureException& e) { + ret = -1; + std::cout << "GoogleTestFailureException was thrown:" << e.what() << std::endl; + } + + return ret; } |