SearchArtifactUtil
public
class
SearchArtifactUtil
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.util.SearchArtifactUtil
|
A utility class that can be used to search for test artifacts.
Summary
Public methods |
static
File
|
findModuleDir(String moduleName, boolean targetFirst)
Finds the module directory that matches the given module name
|
static
File
|
getModuleDirFromConfig(IInvocationContext moduleContext)
|
static
File
|
getModuleDirFromConfig()
Returns the module directory if present, when called inside a module scope.
|
static
File
|
searchFile(String fileName, boolean targetFirst)
Searches for a test artifact/dependency file from the test directory.
|
static
File
|
searchFile(String fileName, boolean targetFirst, IAbi abi)
Searches for a test artifact/dependency file from the test directory.
|
static
File
|
searchFile(String fileName, boolean targetFirst, TestInformation testInfo)
Searches for a test artifact/dependency file from the test directory.
|
static
File
|
searchFile(String fileName, boolean targetFirst, IAbi abi, altDirs, AltDirBehavior altDirBehavior, TestInformation testInfo)
Searches for a test artifact/dependency file from the test directory.
|
static
File
|
searchFile(String fileName, boolean targetFirst, altDirs, AltDirBehavior altDirBehavior)
Searches for a test artifact/dependency file from the test directory.
|
Fields
Public constructors
SearchArtifactUtil
public SearchArtifactUtil ()
Public methods
findModuleDir
public static File findModuleDir (String moduleName,
boolean targetFirst)
Finds the module directory that matches the given module name
Parameters |
moduleName |
String : The name of the module. |
targetFirst |
boolean : Whether we are favoring target-side vs. host-side for the search. |
Returns |
File |
the module directory. Can be null. |
getModuleDirFromConfig
public static File getModuleDirFromConfig (IInvocationContext moduleContext)
Parameters |
moduleContext |
IInvocationContext |
getModuleDirFromConfig
public static File getModuleDirFromConfig ()
Returns the module directory if present, when called inside a module scope.
searchFile
public static File searchFile (String fileName,
boolean targetFirst)
Searches for a test artifact/dependency file from the test directory.
Parameters |
fileName |
String : The name of the file to look for. |
targetFirst |
boolean : Whether we are favoring target-side files vs. host-side files for the
search. |
Returns |
File |
The found artifact file or null if none. |
searchFile
public static File searchFile (String fileName,
boolean targetFirst,
IAbi abi)
Searches for a test artifact/dependency file from the test directory.
Parameters |
fileName |
String : The name of the file to look for. |
targetFirst |
boolean : Whether we are favoring target-side files vs. host-side files for the
search. |
abi |
IAbi : The IAbi to match the file. |
Returns |
File |
The found artifact file or null if none. |
public static File searchFile (String fileName,
boolean targetFirst,
TestInformation testInfo)
Searches for a test artifact/dependency file from the test directory.
Parameters |
fileName |
String : The name of the file to look for. |
targetFirst |
boolean : Whether we are favoring target-side files vs. host-side files for the
search. |
testInfo |
TestInformation : The TestInformation of the current test when available. |
Returns |
File |
The found artifact file or null if none. |
public static File searchFile (String fileName,
boolean targetFirst,
IAbi abi,
altDirs,
AltDirBehavior altDirBehavior,
TestInformation testInfo)
Searches for a test artifact/dependency file from the test directory.
Parameters |
fileName |
String : The name of the file to look for. |
targetFirst |
boolean : Whether we are favoring target-side files vs. host-side files for the
search. |
abi |
IAbi : The IAbi to match the file. |
altDirs |
: Alternative search paths, in addition to the default search paths. |
altDirBehavior |
AltDirBehavior : how alternative search paths should be used against default paths: as
fallback, or as override; if unspecified, fallback will be used |
testInfo |
TestInformation |
Returns |
File |
The found artifact file or null if none. |
searchFile
public static File searchFile (String fileName,
boolean targetFirst,
altDirs,
AltDirBehavior altDirBehavior)
Searches for a test artifact/dependency file from the test directory.
Parameters |
fileName |
String : The name of the file to look for. |
targetFirst |
boolean : Whether we are favoring target-side files vs. host-side files for the
search. |
altDirs |
: Alternative search paths, in addition to the default search paths. |
altDirBehavior |
AltDirBehavior : how alternative search paths should be used against default paths: as
fallback, or as override; if unspecified, fallback will be used |
Returns |
File |
The found artifact file or null if none. |