X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fframework%2Fsrc%2Ftest_runner_child.cpp;h=816316ac55e2d79b97398381bc28c81c53cfc6d7;hb=90bbd6419996455c707450a416f0ffb0c8635039;hp=19ed08c5d066b47f918172a52c176947f3d74cc8;hpb=a26a8f273a3146dbb4ae420eb079e4e436bf0f7c;p=platform%2Fcore%2Ftest%2Fsecurity-tests.git diff --git a/src/framework/src/test_runner_child.cpp b/src/framework/src/test_runner_child.cpp index 19ed08c..816316a 100644 --- a/src/framework/src/test_runner_child.cpp +++ b/src/framework/src/test_runner_child.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2013-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,13 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* +/** * @file test_runner_child.cpp * @author Bartlomiej Grzelewski (b.grzelewski@samsung.com) * @version 1.0 * @brief This file is the implementation file of test runner */ #include +#include +#include #include #include #include @@ -297,13 +299,13 @@ void RunChildProc(TestRunner::TestCase procChild) { PipeWrapper pipe; if (!pipe.isReady()) { - throw TestRunner::TestFailed("Pipe creation failed"); + throw TestFailed("Pipe creation failed"); } pid_t pid = fork(); if (pid == -1) { - throw TestRunner::TestFailed("Child creation failed"); + throw TestFailed("Child creation failed"); } if (pid != 0) { @@ -327,11 +329,11 @@ void RunChildProc(TestRunner::TestCase procChild) waitpid(pid, &status, 0); if (pipeReturn == PipeWrapper::TIMEOUT) { - throw TestRunner::TestFailed("Timeout"); + throw TestFailed("Timeout"); } if (pipeReturn == PipeWrapper::ERROR) { - throw TestRunner::TestFailed("Reading pipe error"); + throw TestFailed("Reading pipe error"); } if (code == CHILD_TEST_PASS && msgType == MSG_TYPE_PERF_TIME) { @@ -341,9 +343,9 @@ void RunChildProc(TestRunner::TestCase procChild) } if (code == CHILD_TEST_FAIL) { - throw TestRunner::TestFailed(message); + throw TestFailed(message); } else if (code == CHILD_TEST_IGNORED) { - throw TestRunner::Ignored(message); + throw TestIgnored(message); } } else { // child code @@ -368,10 +370,10 @@ void RunChildProc(TestRunner::TestCase procChild) try { procChild(); - } catch (const DPL::Test::TestRunner::TestFailed &e) { + } catch (const DPL::Test::TestFailed &e) { msg = e.GetMessage(); code = CHILD_TEST_FAIL; - } catch (const DPL::Test::TestRunner::Ignored &e) { + } catch (const DPL::Test::TestIgnored &e) { msg = e.GetMessage(); code = CHILD_TEST_IGNORED; } catch (...) { // catch all exception generated by "user" code