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.
FakeTestsZipFolder
public
class
FakeTestsZipFolder
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.util.FakeTestsZipFolder
|
A testing fixture that creates a fake unzipped tests folder based on a list of content.
The folder structure is configured based on a list of file names or folder names, as provided
to the constructor. FakeTestsZipFolder.cleanUp()
should be called after the folder is
no longer needed.
Summary
Public constructors |
FakeTestsZipFolder( items)
Create a fake unzipped tests folder backed by empty files
|
Public methods |
void
|
cleanUp()
Delete the entire fake unzipped test folder
|
boolean
|
createItems()
Create fake unzipped tests folder as indicated by the manifest of items
|
File
|
getBasePath()
Returns the base of the fake unzipped folder This would be a replacement
of root folder where a real tests zip is expanded
|
Public constructors
FakeTestsZipFolder
public FakeTestsZipFolder ( items)
Create a fake unzipped tests folder backed by empty files
Parameters |
items |
: list of items to include in the fake unzipped folder. key of
the map shall be the relative path of the item, value of the
entry shall indicate if the entry should be backed by an empty
file or a folder |
Public methods
cleanUp
public void cleanUp ()
Delete the entire fake unzipped test folder
createItems
public boolean createItems ()
Create fake unzipped tests folder as indicated by the manifest of items
Returns |
boolean |
false if failed to create any item |
getBasePath
public File getBasePath ()
Returns the base of the fake unzipped folder This would be a replacement
of root folder where a real tests zip is expanded
Protected methods
getDataFolder
protected File getDataFolder ()
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 2024-12-09 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 2024-12-09 UTC."],[],[],null,["# FakeTestsZipFolder\n==================\n\n\n`\npublic\n\n\nclass\nFakeTestsZipFolder\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.util.FakeTestsZipFolder |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA testing fixture that creates a fake unzipped tests folder based on a list of content.\n\nThe folder structure is configured based on a list of file names or folder names, as provided\nto the constructor. [FakeTestsZipFolder.cleanUp()](../../../../../../reference/tradefed/com/android/tradefed/util/FakeTestsZipFolder.html#cleanUp()) should be called after the folder is\nno longer needed.\n\nSummary\n-------\n\n| ### Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[FakeTestsZipFolder](../../../../../../reference/tradefed/com/android/tradefed/util/FakeTestsZipFolder.html#FakeTestsZipFolder(\u003cany\u003e))`(` items) Create a fake unzipped tests folder backed by empty files |\n\n| ### Public methods ||\n|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` void` | ` `[cleanUp](../../../../../../reference/tradefed/com/android/tradefed/util/FakeTestsZipFolder.html#cleanUp())`() ` Delete the entire fake unzipped test folder |\n| ` boolean` | ` `[createItems](../../../../../../reference/tradefed/com/android/tradefed/util/FakeTestsZipFolder.html#createItems())`() ` Create fake unzipped tests folder as indicated by the manifest of items |\n| ` File` | ` `[getBasePath](../../../../../../reference/tradefed/com/android/tradefed/util/FakeTestsZipFolder.html#getBasePath())`() ` Returns the base of the fake unzipped folder This would be a replacement of root folder where a real tests zip is expanded |\n\n| ### Protected methods ||\n|---------|---------------------------------------------------------------------------------------------------------------------------------|\n| ` File` | ` `[getDataFolder](../../../../../../reference/tradefed/com/android/tradefed/util/FakeTestsZipFolder.html#getDataFolder())`() ` |\n\nPublic constructors\n-------------------\n\n### FakeTestsZipFolder\n\n```\npublic FakeTestsZipFolder ( items)\n```\n\nCreate a fake unzipped tests folder backed by empty files\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `items` | : list of items to include in the fake unzipped folder. key of the map shall be the relative path of the item, value of the entry shall indicate if the entry should be backed by an empty file or a folder \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### cleanUp\n\n```\npublic void cleanUp ()\n```\n\nDelete the entire fake unzipped test folder\n\n\u003cbr /\u003e\n\n### createItems\n\n```\npublic boolean createItems ()\n```\n\nCreate fake unzipped tests folder as indicated by the manifest of items\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|-------------------------------------------|\n| `boolean` | false if failed to create any item \u003cbr /\u003e |\n\n| Throws ||\n|---|-------------|\n| | IOException |\n\n### getBasePath\n\n```\npublic File getBasePath ()\n```\n\nReturns the base of the fake unzipped folder This would be a replacement\nof root folder where a real tests zip is expanded\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------|--------|\n| `File` | \u003cbr /\u003e |\n\nProtected methods\n-----------------\n\n### getDataFolder\n\n```\nprotected File getDataFolder ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------|--------|\n| `File` | \u003cbr /\u003e |"]]