Google is committed to advancing racial equity for Black communities. See how.

TestDescriptionsFile

public class TestDescriptionsFile
extends Object

java.lang.Object
   ↳ com.android.tradefed.result.TestDescriptionsFile


A utility class for marshalling and unmarshalling a list of TestDescriptions to a test file.

Intended to cache and minimize file I/O by lazy loading.

NOT thread safe.

Summary

Public constructors

TestDescriptionsFile()

Create an empty test description list.

TestDescriptionsFile(File file)

Create a test description list from the file contents.

Public methods

void add(TestDescription test)
void addAll( test)
static TestDescriptionsFile fromTests( shardTests)
File getFile()

Return the test file representation of the tests - building it if necessary.

getTests()

Return a copy of the tests stored - building from test file if necessary.

void populateTestFile(File testfile)

Populates the given file with the current tests.

void remove(TestDescription test)
int size()

Public constructors

TestDescriptionsFile

public TestDescriptionsFile ()

Create an empty test description list.

TestDescriptionsFile

public TestDescriptionsFile (File file)

Create a test description list from the file contents.

Parameters
file File

Public methods

add

public void add (TestDescription test)

Parameters
test TestDescription

addAll

public void addAll ( test)

Parameters
test

fromTests

public static TestDescriptionsFile fromTests ( shardTests)

Parameters
shardTests

Returns
TestDescriptionsFile

getFile

public File getFile ()

Return the test file representation of the tests - building it if necessary.

Tests will be unique and sorted.

Returns
File

getTests

public  getTests ()

Return a copy of the tests stored - building from test file if necessary.

Returns

populateTestFile

public void populateTestFile (File testfile)

Populates the given file with the current tests.

Parameters
testfile File

remove

public void remove (TestDescription test)

Parameters
test TestDescription

size

public int size ()

Returns
int