1 /*
2  * Copyright (C) 2016 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.testtype;
17 
18 import java.io.File;
19 
20 /**
21  * A runner that can receive a file specifying which tests to run and/or not to run.
22  *
23  * <p>A test will be run if it is included in the testFile provided, and not excluded by the
24  * notTestFile or by an exclude filter provided to the test runner.
25  * Either file should contain a line separated list of test names, formatted as filters.</p>
26  *
27  * <p>The format of the filters is defined by the runner, and could be structured as
28  * &lt;package&gt;, &lt;package&gt;.&lt;class&gt;, &lt;package&gt;.&lt;class&gt;#&lt;method&gt; or
29  * &lt;native_name&gt;. They can even be regexes.</p>
30  */
31 public interface ITestFileFilterReceiver {
32 
33     /**
34      * Sets the test file of includes. Does not ensure that testFile exists or is a file.
35      */
setIncludeTestFile(File testFile)36     void setIncludeTestFile(File testFile);
37 
38     /**
39      * Sets the test file of excludes. Does not ensure that testFile exists or is a file.
40      */
setExcludeTestFile(File testFile)41     void setExcludeTestFile(File testFile);
42 }
43