1 /*
2  * Copyright (C) 2010 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.build;
17 
18 /**
19  * Responsible for providing info regarding the build under test.
20  */
21 public interface IBuildProvider {
22 
23     /**
24      * Retrieve the data for build under test.
25      *
26      * @return the {@link IBuildInfo} for build under test or <code>null</code> if no build is
27      * available for testing
28      * @throws BuildRetrievalError if build info failed to be retrieved due to an unexpected error
29      */
getBuild()30     public IBuildInfo getBuild() throws BuildRetrievalError;
31 
32     /**
33      * Mark the given build as untested.
34      * <p/>
35      * Called in cases where TradeFederation has failed to complete testing on the build due to an
36      * environment problem.
37      *
38      * @param info the {@link IBuildInfo} to reset
39      */
buildNotTested(IBuildInfo info)40     public void buildNotTested(IBuildInfo info);
41 
42     /**
43      * Clean up any temporary build files.
44      */
cleanUp(IBuildInfo info)45     public void cleanUp(IBuildInfo info);
46 }
47