1*c2e18aaaSAndroid Build Coastguard Worker# Copyright 2018, The Android Open Source Project 2*c2e18aaaSAndroid Build Coastguard Worker# 3*c2e18aaaSAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License"); 4*c2e18aaaSAndroid Build Coastguard Worker# you may not use this file except in compliance with the License. 5*c2e18aaaSAndroid Build Coastguard Worker# You may obtain a copy of the License at 6*c2e18aaaSAndroid Build Coastguard Worker# 7*c2e18aaaSAndroid Build Coastguard Worker# http://www.apache.org/licenses/LICENSE-2.0 8*c2e18aaaSAndroid Build Coastguard Worker# 9*c2e18aaaSAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software 10*c2e18aaaSAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS, 11*c2e18aaaSAndroid Build Coastguard Worker# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*c2e18aaaSAndroid Build Coastguard Worker# See the License for the specific language governing permissions and 13*c2e18aaaSAndroid Build Coastguard Worker# limitations under the License. 14*c2e18aaaSAndroid Build Coastguard Worker 15*c2e18aaaSAndroid Build Coastguard Worker"""atest exceptions.""" 16*c2e18aaaSAndroid Build Coastguard Worker 17*c2e18aaaSAndroid Build Coastguard Worker 18*c2e18aaaSAndroid Build Coastguard Workerclass UnsupportedModuleTestError(Exception): 19*c2e18aaaSAndroid Build Coastguard Worker """Error raised when we find a module that we don't support.""" 20*c2e18aaaSAndroid Build Coastguard Worker 21*c2e18aaaSAndroid Build Coastguard Worker 22*c2e18aaaSAndroid Build Coastguard Workerclass TestDiscoveryException(Exception): 23*c2e18aaaSAndroid Build Coastguard Worker """Base Exception for issues with test discovery.""" 24*c2e18aaaSAndroid Build Coastguard Worker 25*c2e18aaaSAndroid Build Coastguard Worker 26*c2e18aaaSAndroid Build Coastguard Workerclass NoTestFoundError(TestDiscoveryException): 27*c2e18aaaSAndroid Build Coastguard Worker """Raised when no tests are found.""" 28*c2e18aaaSAndroid Build Coastguard Worker 29*c2e18aaaSAndroid Build Coastguard Worker 30*c2e18aaaSAndroid Build Coastguard Workerclass TestWithNoModuleError(TestDiscoveryException): 31*c2e18aaaSAndroid Build Coastguard Worker """Raised when test files have no parent module directory.""" 32*c2e18aaaSAndroid Build Coastguard Worker 33*c2e18aaaSAndroid Build Coastguard Worker 34*c2e18aaaSAndroid Build Coastguard Workerclass MethodWithoutClassError(TestDiscoveryException): 35*c2e18aaaSAndroid Build Coastguard Worker """Raised when method is appended via # but no class file specified.""" 36*c2e18aaaSAndroid Build Coastguard Worker 37*c2e18aaaSAndroid Build Coastguard Worker 38*c2e18aaaSAndroid Build Coastguard Workerclass UnknownTestRunnerError(Exception): 39*c2e18aaaSAndroid Build Coastguard Worker """Raised when an unknown test runner is specified.""" 40*c2e18aaaSAndroid Build Coastguard Worker 41*c2e18aaaSAndroid Build Coastguard Worker 42*c2e18aaaSAndroid Build Coastguard Workerclass NoTestRunnerName(Exception): 43*c2e18aaaSAndroid Build Coastguard Worker """Raised when Test Runner class var NAME isn't defined.""" 44*c2e18aaaSAndroid Build Coastguard Worker 45*c2e18aaaSAndroid Build Coastguard Worker 46*c2e18aaaSAndroid Build Coastguard Workerclass NoTestRunnerExecutable(Exception): 47*c2e18aaaSAndroid Build Coastguard Worker """Raised when Test Runner class var EXECUTABLE isn't defined.""" 48*c2e18aaaSAndroid Build Coastguard Worker 49*c2e18aaaSAndroid Build Coastguard Worker 50*c2e18aaaSAndroid Build Coastguard Workerclass HostEnvCheckFailed(Exception): 51*c2e18aaaSAndroid Build Coastguard Worker """Raised when Test Runner's host env check fails.""" 52*c2e18aaaSAndroid Build Coastguard Worker 53*c2e18aaaSAndroid Build Coastguard Worker 54*c2e18aaaSAndroid Build Coastguard Workerclass ShouldNeverBeCalledError(Exception): 55*c2e18aaaSAndroid Build Coastguard Worker """Raised when something is called when it shouldn't, used for testing.""" 56*c2e18aaaSAndroid Build Coastguard Worker 57*c2e18aaaSAndroid Build Coastguard Worker 58*c2e18aaaSAndroid Build Coastguard Workerclass FatalIncludeError(TestDiscoveryException): 59*c2e18aaaSAndroid Build Coastguard Worker """Raised if expanding include tag fails.""" 60*c2e18aaaSAndroid Build Coastguard Worker 61*c2e18aaaSAndroid Build Coastguard Worker 62*c2e18aaaSAndroid Build Coastguard Workerclass MissingCCTestCaseError(TestDiscoveryException): 63*c2e18aaaSAndroid Build Coastguard Worker """Raised when the cc file does not contain a test case class.""" 64*c2e18aaaSAndroid Build Coastguard Worker 65*c2e18aaaSAndroid Build Coastguard Worker 66*c2e18aaaSAndroid Build Coastguard Workerclass XmlNotExistError(TestDiscoveryException): 67*c2e18aaaSAndroid Build Coastguard Worker """Raised when the xml file does not exist.""" 68*c2e18aaaSAndroid Build Coastguard Worker 69*c2e18aaaSAndroid Build Coastguard Worker 70*c2e18aaaSAndroid Build Coastguard Workerclass DryRunVerificationError(Exception): 71*c2e18aaaSAndroid Build Coastguard Worker """Base Exception if verification fail.""" 72