LCUtil

public class LCUtil
extends Object

java.lang.Object
   ↳ com.google.android.tradefed.build.LCUtil


Helper class to parse a Launch Control path into its constituent parts

Summary

Constants

String BRANCH

String BUILD_ID

String FILENAME

String FLAVOR

String KERNEL

String KEY

String OS

Public methods

static String createResolvableFilePath(String remoteFilePath)

Gets the file path can be used to retrieve a resolver.

static Map<String, String> parseAttributeLine(String line)

Parse a line like "userdata:git_master-linux-yakju-tests/242537/userdata.img" into a Map like "{key:userdata, branch:git_master, flavor:yakju-tests, bid:242537, file:userdata.img}" It also supports parsing remote path started with protocol, e.g., "ab:/aosp_master/yakju-userdebug/P123/device-tests.zip" will be parsed to a Map like "{branch:aosp_master, flavor:yakju-userdebug, bid:P123, filename:device-tests.zip}"

static String reverseDynamicAbPath(String abDynamicLink)

Constants

BRANCH

public static final String BRANCH

Constant Value: "branch"

BUILD_ID

public static final String BUILD_ID

Constant Value: "bid"

FILENAME

public static final String FILENAME

Constant Value: "filename"

FLAVOR

public static final String FLAVOR

Constant Value: "flavor"

KERNEL

public static final String KERNEL

Constant Value: "kernel"

KEY

public static final String KEY

Constant Value: "key"

OS

public static final String OS

Constant Value: "os"

Public methods

createResolvableFilePath

public static String createResolvableFilePath (String remoteFilePath)

Gets the file path can be used to retrieve a resolver.

Parameters
remoteFilePath String: the remote path to the file to download in LaunchControlProvider, e.g., aosp_master-linux-yakju-userdebug/P123/device-tests.zip

Returns
String

parseAttributeLine

public static Map<String, String> parseAttributeLine (String line)

Parse a line like "userdata:git_master-linux-yakju-tests/242537/userdata.img" into a Map like "{key:userdata, branch:git_master, flavor:yakju-tests, bid:242537, file:userdata.img}" It also supports parsing remote path started with protocol, e.g., "ab:/aosp_master/yakju-userdebug/P123/device-tests.zip" will be parsed to a Map like "{branch:aosp_master, flavor:yakju-userdebug, bid:P123, filename:device-tests.zip}"

Parameters
line String

Returns
Map<String, String>

reverseDynamicAbPath

public static String reverseDynamicAbPath (String abDynamicLink)

Parameters
abDynamicLink String

Returns
String