/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2014-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.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-/*
+/**
* @file test_runner_multiprocess.cpp
* @author Marcin Niesluchowski (m.niesluchow@samsung.com)
* @version 1.0
#include <sys/file.h>
#include <dpl/exception.h>
+#include <dpl/test/test_failed.h>
+#include <dpl/test/test_ignored.h>
#include <dpl/test/test_runner.h>
#include <dpl/test/test_runner_child.h>
#include <dpl/test/test_runner_multiprocess.h>
pid_t top_pid = getpid();
if (!pipe.isReady()) {
- throw TestRunner::TestFailed("Pipe creation failed");
+ throw TestFailed("Pipe creation failed");
}
// pipe
try {
procMulti();
- } catch (const TestRunner::TestFailed &e) {
+ } catch (const TestFailed &e) {
code = MULTI_TEST_FAILED;
msg = e.GetMessage();
- } catch (const TestRunner::Ignored &e) {
+ } catch (const TestIgnored &e) {
code = MULTI_TEST_IGNORED;
msg = e.GetMessage();
} catch (const std::exception &) {
}
if (pipeReturn == PipeWrapper::ERROR) {
pipe.closeAll();
- throw TestRunner::TestFailed("Reading pipe error");
+ throw TestFailed("Reading pipe error");
} else if (pipeReturn == PipeWrapper::TIMEOUT) {
pipe.closeAll();
- throw TestRunner::TestFailed("Timeout error");
+ throw TestFailed("Timeout error");
}
msg = msg + "\n" + recMsg;
}
case MULTI_TEST_PASS:
return;
case MULTI_TEST_FAILED:
- throw TestRunner::TestFailed(msg);
+ throw TestFailed(msg);
case MULTI_TEST_IGNORED:
- throw TestRunner::Ignored(msg);
+ throw TestIgnored(msg);
default:
- throw TestRunner::TestFailed(msg);
+ throw TestFailed(msg);
}
} else {
pipe.setUsage(PipeWrapper::WRITEONLY);