Document job exception handling machinations in comments and remove an
except Exception: case in job.run_test() that was impossible to reach.
Allow error.JobError raised from a test (run via run_test or run_group)
to be recorded as an ABORT and passed on up to actually ABORT things.
Signed-off-by: Gregory Smith <gps@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@2522 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/common_lib/error.py b/client/common_lib/error.py
index 16b742d..8c002aa 100644
--- a/client/common_lib/error.py
+++ b/client/common_lib/error.py
@@ -42,33 +42,30 @@
class TestBaseException(AutotestError):
"""The parent of all test exceptions."""
- pass
+ # Children are required to override this. Never instantiate directly.
+ exit_status="NEVER_RAISE_THIS"
class TestError(TestBaseException):
"""Indicates that something went wrong with the test harness itself."""
exit_status="ERROR"
- pass
class TestNAError(TestBaseException):
"""Indictates that the test is Not Applicable. Should be thrown
when various conditions are such that the test is inappropriate."""
exit_status="TEST_NA"
- pass
class TestFail(TestBaseException):
"""Indicates that the test failed, but the job will not continue."""
exit_status="FAIL"
- pass
class TestWarn(TestBaseException):
"""Indicates that bad things (may) have happened, but not an explicit
failure."""
exit_status="WARN"
- pass
class UnhandledTestError(TestError):
@@ -138,6 +135,7 @@
class AutotestRunError(AutotestError):
+ """Indicates a problem running server side control files."""
pass