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.
ModuleSplitter
public
class
ModuleSplitter
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.testtype.suite.ModuleSplitter
|
Helper to split a list of modules represented by IConfiguration
into a list of execution
units represented by ModuleDefinition
.
Each configuration may generate 1 or more ModuleDefinition
depending on its options
and test types:
Summary
Public methods |
static
|
splitConfiguration(TestInformation testInfo, runConfig, suitePreparersPerDevice, int shardCount, boolean dynamicModule, boolean intraModuleSharding)
Create a List of executable unit ModuleDefinition s based on the map of configuration
that was loaded.
|
Public constructors
ModuleSplitter
public ModuleSplitter ()
Public methods
public static splitConfiguration (TestInformation testInfo,
runConfig,
suitePreparersPerDevice,
int shardCount,
boolean dynamicModule,
boolean intraModuleSharding)
Create a List of executable unit ModuleDefinition
s based on the map of configuration
that was loaded.
Parameters |
testInfo |
TestInformation : the current TestInformation to proceed with sharding. |
runConfig |
: ERROR(/LinkedHashMap) loaded from ITestSuite.loadTests() . |
suitePreparersPerDevice |
: map of suite level preparers per test device. |
shardCount |
int : a shard count hint to help with sharding. |
dynamicModule |
boolean : Whether or not module can be shared in pool or must be independent
(strict sharding). |
intraModuleSharding |
boolean : Whether or not to shard within the modules. |
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,["# ModuleSplitter\n==============\n\n\n`\npublic\n\n\nclass\nModuleSplitter\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.testtype.suite.ModuleSplitter |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nHelper to split a list of modules represented by [IConfiguration](../../../../../../../reference/tradefed/com/android/tradefed/config/IConfiguration.html) into a list of execution\nunits represented by [ModuleDefinition](../../../../../../../reference/tradefed/com/android/tradefed/testtype/suite/ModuleDefinition.html).\n\nEach configuration may generate 1 or more [ModuleDefinition](../../../../../../../reference/tradefed/com/android/tradefed/testtype/suite/ModuleDefinition.html) depending on its options\nand test types:\n\n- A non-shardable [IConfiguration](../../../../../../../reference/tradefed/com/android/tradefed/config/IConfiguration.html) will generate a single [ModuleDefinition](../../../../../../../reference/tradefed/com/android/tradefed/testtype/suite/ModuleDefinition.html).\n- A shardable [IConfiguration](../../../../../../../reference/tradefed/com/android/tradefed/config/IConfiguration.html) will generate a number of ModuleDefinition linked to the [IRemoteTest](../../../../../../../reference/tradefed/com/android/tradefed/testtype/IRemoteTest.html) properties:\n - A non - [IShardableTest](../../../../../../../reference/tradefed/com/android/tradefed/testtype/IShardableTest.html) will generate a single ModuleDefinition.\n - A [IShardableTest](../../../../../../../reference/tradefed/com/android/tradefed/testtype/IShardableTest.html) generates one ModuleDefinition per tests returned by [IShardableTest.split()](../../../../../../../reference/tradefed/com/android/tradefed/testtype/IShardableTest.html#split()).\n\n\u003cbr /\u003e\n\nSummary\n-------\n\n| ### Public constructors ||\n|--------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[ModuleSplitter](../../../../../../../reference/tradefed/com/android/tradefed/testtype/suite/ModuleSplitter.html#ModuleSplitter())`() ` |\n\n| ### Public methods ||\n|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static ` | ` `[splitConfiguration](../../../../../../../reference/tradefed/com/android/tradefed/testtype/suite/ModuleSplitter.html#splitConfiguration(com.android.tradefed.invoker.TestInformation,%20\u003cany\u003e,%20\u003cany\u003e,%20int,%20boolean,%20boolean))`(`[TestInformation](../../../../../../../reference/tradefed/com/android/tradefed/invoker/TestInformation.html)` testInfo, ` runConfig, suitePreparersPerDevice, int shardCount, boolean dynamicModule, boolean intraModuleSharding) Create a List of executable unit [ModuleDefinition](../../../../../../../reference/tradefed/com/android/tradefed/testtype/suite/ModuleDefinition.html)s based on the map of configuration that was loaded. |\n\nPublic constructors\n-------------------\n\n### ModuleSplitter\n\n```\npublic ModuleSplitter ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### splitConfiguration\n\n```\npublic static splitConfiguration (../../../../../../../reference/tradefed/com/android/tradefed/invoker/TestInformation.html testInfo, \n runConfig, \n suitePreparersPerDevice, \n int shardCount, \n boolean dynamicModule, \n boolean intraModuleSharding)\n```\n\nCreate a List of executable unit [ModuleDefinition](../../../../../../../reference/tradefed/com/android/tradefed/testtype/suite/ModuleDefinition.html)s based on the map of configuration\nthat was loaded.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `testInfo` | `TestInformation`: the current [TestInformation](../../../../../../../reference/tradefed/com/android/tradefed/invoker/TestInformation.html) to proceed with sharding. \u003cbr /\u003e |\n| `runConfig` | : [ERROR(/LinkedHashMap)](../../../../../../../) loaded from [ITestSuite.loadTests()](../../../../../../../reference/tradefed/com/android/tradefed/testtype/suite/ITestSuite.html#loadTests()). \u003cbr /\u003e |\n| `suitePreparersPerDevice` | : map of suite level preparers per test device. \u003cbr /\u003e |\n| `shardCount` | `int`: a shard count hint to help with sharding. \u003cbr /\u003e |\n| `dynamicModule` | `boolean`: Whether or not module can be shared in pool or must be independent (strict sharding). \u003cbr /\u003e |\n| `intraModuleSharding` | `boolean`: Whether or not to shard within the modules. \u003cbr /\u003e |\n\n| Returns ||\n|---|--------------------------------------------------------------------------------------------------------------------------------------|\n| | List of [ModuleDefinition](../../../../../../../reference/tradefed/com/android/tradefed/testtype/suite/ModuleDefinition.html) \u003cbr /\u003e |"]]