Add other test exit status according to the spec in:
http://test.kernel.org/autotest/ResultsSpecification
TestNAError -> TEST_NA (clean msg)
TestError -> ERROR (clean msg)
TestFail -> FAIL (clean msg)
default -> FAIL (traceback)
Risk: Low, since the default behavior is still the same (FAIL)
Signed-off-by: Rafael Xavier <rxaviers@br.ibm.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1732 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/common_lib/error.py b/client/common_lib/error.py
index a8177c8..25a9e9a 100644
--- a/client/common_lib/error.py
+++ b/client/common_lib/error.py
@@ -36,13 +36,31 @@
class TestError(AutotestError):
+ """Indicates that something went wrong with the test harness itself."""
+ exit_status="ERROR"
+ pass
+
+class TestUnknownError(AutotestError):
"""Indicates an error which terminates and fails the test."""
+ exit_status="FAIL"
pass
class TestNAError(AutotestError):
"""Indictates that the test is Not Applicable. Should be thrown
- when various conditions are such that the test is inappropriate"""
+ when various conditions are such that the test is inappropriate."""
+ exit_status="TEST_NA"
+ pass
+
+class TestFail(AutotestError):
+ """Indicates that the test failed, but the job will not continue."""
+ exit_status="FAIL"
+ pass
+
+class TestWarn(AutotestError):
+ """Indicates that bad things (may) have happened, but not an explicit
+ failure."""
+ exit_status="WARN"
pass
@@ -67,7 +85,7 @@
pass
-class UnhandledError(TestError):
+class UnhandledError(TestUnknownError):
"""Indicates an unhandled exception in a test."""
def __init__(self, unhandled_exception):
if isinstance(unhandled_exception, TestError):