INTERNAL fail status is treated as FAILED fail status. It is collected
in case of:
* DPL::Exception - should not be thrown by test cased body, as it is used
in test framework only
* std::exception - which implies that test case is not constructed well
or there is not enough resources, which may be also passed as Failed
state in RUNNER_* macros.
* other exceptions - same as std::exception
Change-Id: I8776622afcb9d01739f8780183ad4c5f364deb25
- * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2014 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
(void)performanceMaxTime;
switch (status) {
case FailStatus::IGNORED: ++m_ignored; break;
(void)performanceMaxTime;
switch (status) {
case FailStatus::IGNORED: ++m_ignored; break;
- case FailStatus::INTERNAL: // internal error count as fail
case FailStatus::FAILED: ++m_failed; break;
case FailStatus::NONE: ++m_succeeded; break;
};
case FailStatus::FAILED: ++m_failed; break;
case FailStatus::NONE: ++m_succeeded; break;
};
{
switch (status) {
case FailStatus::IGNORED: ++m_ignored; break;
{
switch (status) {
case FailStatus::IGNORED: ++m_ignored; break;
- case FailStatus::INTERNAL: // internal error count as fail
case FailStatus::FAILED: ++m_failed; break;
case FailStatus::NONE: ++m_succeeded; break;
};
case FailStatus::FAILED: ++m_failed; break;
case FailStatus::NONE: ++m_succeeded; break;
};
{
++m_count;
switch (type) {
{
++m_count;
switch (type) {
- case TestResultsCollectorBase::FailStatus::INTERNAL:
case TestResultsCollectorBase::FailStatus::FAILED: ++m_failed;
break;
case TestResultsCollectorBase::FailStatus::IGNORED: ++m_ignored;
case TestResultsCollectorBase::FailStatus::FAILED: ++m_failed;
break;
case TestResultsCollectorBase::FailStatus::IGNORED: ++m_ignored;
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2014 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
case TestResultsCollectorBase::FailStatus::IGNORED:
PrintfIgnoredMessage("Ignored ", reason, true);
break;
case TestResultsCollectorBase::FailStatus::IGNORED:
PrintfIgnoredMessage("Ignored ", reason, true);
break;
- case TestResultsCollectorBase::FailStatus::INTERNAL:
- PrintfErrorMessage("INTERNAL", reason, true);
- break;
default:
Assert(false && "Bad status");
}
default:
Assert(false && "Bad status");
}
case TestResultsCollectorBase::FailStatus::IGNORED:
PrintfIgnoredMessage("Ignored ", reason, true);
break;
case TestResultsCollectorBase::FailStatus::IGNORED:
PrintfIgnoredMessage("Ignored ", reason, true);
break;
- case TestResultsCollectorBase::FailStatus::INTERNAL:
- PrintfErrorMessage("INTERNAL", reason, true);
- break;
default:
Assert(false && "Bad status");
}
default:
Assert(false && "Bad status");
}
reason), true);
m_resultBuffer.append("\t\t</testcase>\n");
break;
reason), true);
m_resultBuffer.append("\t\t</testcase>\n");
break;
- case TestResultsCollectorBase::FailStatus::INTERNAL:
- m_resultBuffer.append(" status=\"FAILED\">\n");
- PrintfErrorMessage("INTERNAL", EscapeSpecialCharacters(
- reason), true);
- m_resultBuffer.append("\t\t</testcase>");
- break;
default:
Assert(false && "Bad status");
}
default:
Assert(false && "Bad status");
}
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2014 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
setCurrentTestCase(nullptr);
return IGNORED;
setCurrentTestCase(nullptr);
return IGNORED;
- } catch (const DPL::Exception &e) {
- // DPL exception failure
- CollectResult(testCase.name,
- "",
- TestResultsCollectorBase::FailStatus::INTERNAL,
- "DPL exception:" + e.GetMessage());
-
- setCurrentTestCase(nullptr);
- return FAILED;
} catch (const std::exception &) {
// std exception failure
CollectResult(testCase.name,
"",
} catch (const std::exception &) {
// std exception failure
CollectResult(testCase.name,
"",
- TestResultsCollectorBase::FailStatus::INTERNAL,
+ TestResultsCollectorBase::FailStatus::FAILED,
"std exception");
setCurrentTestCase(nullptr);
"std exception");
setCurrentTestCase(nullptr);
// Unknown exception failure
CollectResult(testCase.name,
"",
// Unknown exception failure
CollectResult(testCase.name,
"",
- TestResultsCollectorBase::FailStatus::INTERNAL,
+ TestResultsCollectorBase::FailStatus::FAILED,
"unknown exception");
setCurrentTestCase(nullptr);
"unknown exception");
setCurrentTestCase(nullptr);
- * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2014 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
const int MULTI_TEST_PASS = 0;
const int MULTI_TEST_FAILED = 1;
const int MULTI_TEST_IGNORED = 2;
const int MULTI_TEST_PASS = 0;
const int MULTI_TEST_FAILED = 1;
const int MULTI_TEST_IGNORED = 2;
-const int MULTI_TEST_INTERNAL = 3;
} catch (const TestRunner::Ignored &e) {
code = MULTI_TEST_IGNORED;
msg = e.GetMessage();
} catch (const TestRunner::Ignored &e) {
code = MULTI_TEST_IGNORED;
msg = e.GetMessage();
- } catch (const DPL::Exception &e) {
- code = MULTI_TEST_INTERNAL;
- msg = "DPL exception:" + e.GetMessage();
} catch (const std::exception &) {
} catch (const std::exception &) {
- code = MULTI_TEST_INTERNAL;
+ code = MULTI_TEST_FAILED;
msg = "std exception";
} catch (...) {
// Unknown exception failure
msg = "std exception";
} catch (...) {
// Unknown exception failure
- code = MULTI_TEST_INTERNAL;
+ code = MULTI_TEST_FAILED;
msg = "unknown exception";
}
msg = "unknown exception";
}
throw TestRunner::TestFailed(msg);
case MULTI_TEST_IGNORED:
throw TestRunner::Ignored(msg);
throw TestRunner::TestFailed(msg);
case MULTI_TEST_IGNORED:
throw TestRunner::Ignored(msg);
- case MULTI_TEST_INTERNAL:
- throw TestRunner::TestFailed(msg);
default:
throw TestRunner::TestFailed(msg);
}
default:
throw TestRunner::TestFailed(msg);
}
case MULTI_TEST_IGNORED:
code = MULTI_TEST_FAILED;
break;
case MULTI_TEST_IGNORED:
code = MULTI_TEST_FAILED;
break;
- case MULTI_TEST_INTERNAL:
- break;
break;
case MULTI_TEST_IGNORED:
break;
break;
case MULTI_TEST_IGNORED:
break;
- case MULTI_TEST_INTERNAL:
- break;
- default:
- break;
- }
- } else if ((signed char)WEXITSTATUS(waitStatus) == MULTI_TEST_INTERNAL) {
- switch (code) {
- case MULTI_TEST_PASS:
- code = MULTI_TEST_INTERNAL;
- break;
- case MULTI_TEST_FAILED:
- code = MULTI_TEST_INTERNAL;
- break;
- case MULTI_TEST_IGNORED:
- code = MULTI_TEST_INTERNAL;
- break;
- case MULTI_TEST_INTERNAL:
- break;