2018-03-27 14:30:46 -04:00
|
|
|
"""Exceptions raised by resmoke.py."""
|
2015-05-08 14:20:43 -04:00
|
|
|
|
|
|
|
|
|
2018-03-27 14:30:46 -04:00
|
|
|
class ResmokeError(Exception): # noqa: D204
|
|
|
|
|
"""Base class for all resmoke.py exceptions."""
|
2024-05-16 18:00:17 -04:00
|
|
|
|
2017-09-29 17:39:33 -04:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
2018-03-27 14:30:46 -04:00
|
|
|
class SuiteNotFound(ResmokeError): # noqa: D204
|
|
|
|
|
"""A suite that isn't recognized was specified."""
|
2024-05-16 18:00:17 -04:00
|
|
|
|
2015-05-08 14:20:43 -04:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
2021-07-20 14:01:10 +00:00
|
|
|
class DuplicateSuiteDefinition(ResmokeError): # noqa: D204
|
|
|
|
|
"""A suite name with multiple definitions."""
|
2024-05-16 18:00:17 -04:00
|
|
|
|
2021-07-20 14:01:10 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
2018-03-27 14:30:46 -04:00
|
|
|
class StopExecution(ResmokeError): # noqa: D204
|
|
|
|
|
"""Exception raised when resmoke.py should stop executing tests if failing fast is enabled."""
|
2024-05-16 18:00:17 -04:00
|
|
|
|
2015-05-08 14:20:43 -04:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
2018-03-27 14:30:46 -04:00
|
|
|
class UserInterrupt(StopExecution): # noqa: D204
|
|
|
|
|
"""Exception raised when a user signals resmoke.py to unconditionally stop executing tests."""
|
2024-05-16 18:00:17 -04:00
|
|
|
|
2018-06-08 12:45:15 -04:00
|
|
|
EXIT_CODE = 130 # Simulate SIGINT as exit code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class LoggerRuntimeConfigError(StopExecution): # noqa: D204
|
|
|
|
|
"""Exception raised when a logging handler couldn't be configured at runtime."""
|
2024-05-16 18:00:17 -04:00
|
|
|
|
2018-06-08 12:45:15 -04:00
|
|
|
EXIT_CODE = 75
|
2016-01-15 09:30:39 -05:00
|
|
|
|
|
|
|
|
|
2018-03-27 14:30:46 -04:00
|
|
|
class TestFailure(ResmokeError): # noqa: D204
|
|
|
|
|
"""Exception raised by a hook in the after_test method.
|
|
|
|
|
|
|
|
|
|
Raised if it determines the the previous test should be marked as a failure.
|
2015-05-08 14:20:43 -04:00
|
|
|
"""
|
2024-05-16 18:00:17 -04:00
|
|
|
|
2015-05-08 14:20:43 -04:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
2018-03-27 14:30:46 -04:00
|
|
|
class ServerFailure(TestFailure): # noqa: D204
|
|
|
|
|
"""Exception raised by a hook in the after_test method.
|
|
|
|
|
|
|
|
|
|
Raised if it detects that the fixture did not exit cleanly and should be marked
|
2015-05-08 14:20:43 -04:00
|
|
|
as a failure.
|
|
|
|
|
"""
|
2024-05-16 18:00:17 -04:00
|
|
|
|
2015-05-08 14:20:43 -04:00
|
|
|
pass
|
2015-09-01 12:58:04 -04:00
|
|
|
|
|
|
|
|
|
2018-03-27 14:30:46 -04:00
|
|
|
class PortAllocationError(ResmokeError): # noqa: D204
|
|
|
|
|
"""Exception that is raised by the PortAllocator.
|
|
|
|
|
|
|
|
|
|
Raised if a port is requested outside of the range of valid ports, or if a
|
|
|
|
|
fixture requests more ports than were reserved for that job.
|
2015-09-01 12:58:04 -04:00
|
|
|
"""
|
2024-05-16 18:00:17 -04:00
|
|
|
|
2015-09-01 12:58:04 -04:00
|
|
|
pass
|
2020-01-09 15:40:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class ProcessError(ResmokeError):
|
|
|
|
|
"""Exception raised in the process wrapper.
|
|
|
|
|
|
|
|
|
|
Raised if a termination mode is given to the process wrapper that it doesn't
|
|
|
|
|
know how to send a signal for.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
pass
|
2020-06-25 09:27:01 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class UnsafeExitError(ResmokeError):
|
|
|
|
|
"""Exception raised by process test cases.
|
|
|
|
|
|
|
|
|
|
Raised if a process terminates in such a way that further test execution may be unsafe.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
pass
|
2022-01-18 16:16:32 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class CedarReportError(ResmokeError):
|
|
|
|
|
"""Exception raised while generating cedar report."""
|
|
|
|
|
|
|
|
|
|
pass
|
2023-04-03 15:30:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class InvalidMatrixSuiteError(ResmokeError):
|
|
|
|
|
"""Exception raised when validating a matrix suite mapping file."""
|
|
|
|
|
|
|
|
|
|
pass
|
2023-06-20 14:06:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class TagFileDoesNotExistError(ResmokeError):
|
|
|
|
|
"""Exception raised when a tag file is passed into resmoke that does not exist."""
|
|
|
|
|
|
|
|
|
|
pass
|
2023-08-15 14:58:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class RequiresForceRemove(ResmokeError):
|
|
|
|
|
"""Exception raised when a directory cannot be removed."""
|
|
|
|
|
|
|
|
|
|
pass
|
2023-10-11 13:09:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestExcludedFromSuiteError(ResmokeError):
|
|
|
|
|
"""Exception raised when an excluded from suite test passed as positional argument to resmoke."""
|
|
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class SuiteSelectorConfigurationError(ResmokeError):
|
|
|
|
|
"""Exceptions raised when selector section in suite configuration has errors."""
|
|
|
|
|
|
|
|
|
|
pass
|