Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Stay organized with collections
Save and categorize content based on your preferences.
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
public TestDescriptionsFile ()
Create an empty test description list.
TestDescriptionsFile
public TestDescriptionsFile (File file)
Create a test description list from the file contents.
Public methods
addAll
public void addAll ( test)
getFile
public File getFile ()
Return the test file representation of the tests - building it if necessary.
Tests will be unique and sorted.
getTests
public getTests ()
Return a copy of the tests stored - building from test file if necessary.
populateTestFile
public void populateTestFile (File testfile)
Populates the given file with the current tests.
remove
public void remove (TestDescription test)
Parameters |
test |
TestDescription |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-03-08 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-03-08 UTC."],[],[],null,["# TestDescriptionsFile\n====================\n\n\n`\npublic\n\n\nclass\nTestDescriptionsFile\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|--------------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.result.TestDescriptionsFile |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA utility class for marshalling and unmarshalling a list of TestDescriptions to a test file.\n\nIntended to cache and minimize file I/O by lazy loading.\n\nNOT thread safe.\n\nSummary\n-------\n\n| ### Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[TestDescriptionsFile](../../../../../../reference/tradefed/com/android/tradefed/result/TestDescriptionsFile.html#TestDescriptionsFile())`() ` Create an empty test description list. |\n| ` `[TestDescriptionsFile](../../../../../../reference/tradefed/com/android/tradefed/result/TestDescriptionsFile.html#TestDescriptionsFile(File))`(File file) ` Create a test description list from the file contents. |\n\n| ### Public methods ||\n|------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` void` | ` `[add](../../../../../../reference/tradefed/com/android/tradefed/result/TestDescriptionsFile.html#add(com.android.tradefed.result.TestDescription))`(`[TestDescription](../../../../../../reference/tradefed/com/android/tradefed/result/TestDescription.html)` test) ` |\n| ` void` | ` `[addAll](../../../../../../reference/tradefed/com/android/tradefed/result/TestDescriptionsFile.html#addAll(\u003cany\u003e))`(` test) |\n| ` static `[TestDescriptionsFile](../../../../../../reference/tradefed/com/android/tradefed/result/TestDescriptionsFile.html) | ` `[fromTests](../../../../../../reference/tradefed/com/android/tradefed/result/TestDescriptionsFile.html#fromTests(\u003cany\u003e))`(` shardTests) |\n| ` File` | ` `[getFile](../../../../../../reference/tradefed/com/android/tradefed/result/TestDescriptionsFile.html#getFile())`() ` Return the test file representation of the tests - building it if necessary. |\n| ` ` | ` `[getTests](../../../../../../reference/tradefed/com/android/tradefed/result/TestDescriptionsFile.html#getTests())`() ` Return a copy of the tests stored - building from test file if necessary. |\n| ` void` | ` `[populateTestFile](../../../../../../reference/tradefed/com/android/tradefed/result/TestDescriptionsFile.html#populateTestFile(File))`(File testfile) ` Populates the given file with the current tests. |\n| ` void` | ` `[remove](../../../../../../reference/tradefed/com/android/tradefed/result/TestDescriptionsFile.html#remove(com.android.tradefed.result.TestDescription))`(`[TestDescription](../../../../../../reference/tradefed/com/android/tradefed/result/TestDescription.html)` test) ` |\n| ` int` | ` `[size](../../../../../../reference/tradefed/com/android/tradefed/result/TestDescriptionsFile.html#size())`() ` |\n\nPublic constructors\n-------------------\n\n### TestDescriptionsFile\n\n```\npublic TestDescriptionsFile ()\n```\n\nCreate an empty test description list.\n\n\u003cbr /\u003e\n\n### TestDescriptionsFile\n\n```\npublic TestDescriptionsFile (File file)\n```\n\nCreate a test description list from the file contents.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|---------------|\n| `file` | `File` \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### add\n\n```\npublic void add (TestDescription test)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|--------------------------|\n| `test` | `TestDescription` \u003cbr /\u003e |\n\n### addAll\n\n```\npublic void addAll ( test)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|--------|\n| `test` | \u003cbr /\u003e |\n\n### fromTests\n\n```\npublic static TestDescriptionsFile fromTests ( shardTests)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|--------|\n| `shardTests` | \u003cbr /\u003e |\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------------------|--------|\n| [TestDescriptionsFile](../../../../../../reference/tradefed/com/android/tradefed/result/TestDescriptionsFile.html) | \u003cbr /\u003e |\n\n### getFile\n\n```\npublic File getFile ()\n```\n\nReturn the test file representation of the tests - building it if necessary.\n\nTests will be unique and sorted.\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------|--------|\n| `File` | \u003cbr /\u003e |\n\n### getTests\n\n```\npublic getTests ()\n```\n\nReturn a copy of the tests stored - building from test file if necessary.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|--------|\n| | \u003cbr /\u003e |\n\n### populateTestFile\n\n```\npublic void populateTestFile (File testfile)\n```\n\nPopulates the given file with the current tests.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|---------------|\n| `testfile` | `File` \u003cbr /\u003e |\n\n### remove\n\n```\npublic void remove (TestDescription test)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|--------------------------|\n| `test` | `TestDescription` \u003cbr /\u003e |\n\n### size\n\n```\npublic int size ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|--------|\n| `int` | \u003cbr /\u003e |"]]