1 /*
2  * Copyright (C) 2019 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package com.android.tradefed.retry;
17 
18 /** The Retry Strategy to be used when re-running some tests. */
19 public enum RetryStrategy {
20     /** Do not attempt any retry */
21     NO_RETRY,
22     /** Rerun all the tests for the number of attempts specified. */
23     ITERATIONS,
24     /**
25      * Rerun all the tests until the max count is reached or a failure occurs whichever come first.
26      */
27     RERUN_UNTIL_FAILURE,
28     /**
29      * Rerun all the test run and test cases failures until passed or the max number of attempts
30      * specified. Test run failures are rerun in priority (a.k.a. if a run failure and a test case
31      * failure occur, the run failure is rerun).
32      */
33     RETRY_ANY_FAILURE,
34 }
35