| /* |
| * Copyright (C) 2018 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| package com.android.tradefed.testtype.suite.retry; |
| |
| import com.android.tradefed.config.IConfiguration; |
| import com.android.tradefed.result.CollectingTestListener; |
| |
| /** Interface describing an helper to load previous results in a way that can be re-run. */ |
| public interface ITestSuiteResultLoader { |
| |
| /** Initialization of the loader. */ |
| public void init(); |
| |
| /** Retrieve the original command line from the previous run. */ |
| public String getCommandLine(); |
| |
| /** Load the previous results in a {@link CollectingTestListener} format. */ |
| public CollectingTestListener loadPreviousResults(); |
| |
| /** |
| * Allow the specialized loader to customize the configuration before it is re-run. |
| * Customization usually involves adding some objects to the original configuration in order to |
| * make it do some extra things. |
| * |
| * @param config The {@link IConfiguration} that will be re-run. |
| */ |
| public default void customizeConfiguration(IConfiguration config) {} |
| |
| /** Clean up any internal states. */ |
| public default void cleanUp() {} |
| } |