SystemUtil

public class SystemUtil
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.SystemUtil


Utility class for making system calls.

Summary

Constants

String ENV_ANDROID_HOST_OUT_TESTCASES

String ENV_ANDROID_PRODUCT_OUT

String ENV_ANDROID_TARGET_OUT_TESTCASES

Fields

static SystemUtil singleton

Public constructors

SystemUtil()

Public methods

static List<File> getExternalTestCasesDirs()

Get a list of File pointing to tests directories external to Tradefed.

static File getProductOutputDir()

Gets the product specific output dir from an Android build tree.

static List<File> getTestCasesDirs(IBuildInfo buildInfo)

Get a list of File of the test cases directories

Constants

ENV_ANDROID_HOST_OUT_TESTCASES

String ENV_ANDROID_HOST_OUT_TESTCASES

Constant Value: "ANDROID_HOST_OUT_TESTCASES"

ENV_ANDROID_PRODUCT_OUT

String ENV_ANDROID_PRODUCT_OUT

Constant Value: "ANDROID_PRODUCT_OUT"

ENV_ANDROID_TARGET_OUT_TESTCASES

String ENV_ANDROID_TARGET_OUT_TESTCASES

Constant Value: "ANDROID_TARGET_OUT_TESTCASES"

Fields

singleton

SystemUtil singleton

Public constructors

SystemUtil

SystemUtil ()

Public methods

getExternalTestCasesDirs

List<File> getExternalTestCasesDirs ()

Get a list of File pointing to tests directories external to Tradefed.

Returns
List<File>

getProductOutputDir

File getProductOutputDir ()

Gets the product specific output dir from an Android build tree. Typically this location contains images for various device partitions, bootloader, radio and so on.

Note: the method does not guarantee that this path exists.

Returns
File the location of the output dir or null if the current build is not

getTestCasesDirs

List<File> getTestCasesDirs (IBuildInfo buildInfo)

Get a list of File of the test cases directories

Parameters
buildInfo IBuildInfo: the build artifact information. Set it to null if build info is not available or there is no need to get test cases directories from build info.

Returns
List<File> a list of File of directories of the test cases folder of build output, based on the value of environment variables and the given build info.