Cts Suite slight clean up
Remove couple of unneeded stuff. And move config creation
only if module is not excluded.
Test: unit tests
./cts-tradefed run cts-suite -m CtsGestureTestCases
Bug: 37211399
Change-Id: Iacb205c9f74669810554200f669047d963beaee6
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/suite/CompatibilityTestSuite.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/suite/CompatibilityTestSuite.java
index aecdd0e..f5e1f77 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/suite/CompatibilityTestSuite.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/suite/CompatibilityTestSuite.java
@@ -60,14 +60,13 @@
private static final String SUBPLAN_OPTION = "subplan";
private static final String MODULE_OPTION = "module";
private static final String TEST_OPTION = "test";
- private static final String PRECONDITION_ARG_OPTION = "precondition-arg";
private static final String MODULE_ARG_OPTION = "module-arg";
private static final String TEST_ARG_OPTION = "test-arg";
private static final String ABI_OPTION = "abi";
private static final String SKIP_HOST_ARCH_CHECK = "skip-host-arch-check";
private static final String PRIMARY_ABI_RUN = "primary-abi-only";
private static final String PRODUCT_CPU_ABI_KEY = "ro.product.cpu.abi";
-
+
@Option(name = SUBPLAN_OPTION,
description = "the subplan to run",
importance = Importance.IF_UNSET)
@@ -95,12 +94,6 @@
importance = Importance.IF_UNSET)
private String mTestName = null;
- @Option(name = PRECONDITION_ARG_OPTION,
- description = "the arguments to pass to a precondition. The expected format is "
- + "\"<arg-name>:<arg-value>\"",
- importance = Importance.ALWAYS)
- private List<String> mPreconditionArgs = new ArrayList<>();
-
@Option(name = MODULE_ARG_OPTION,
description = "the arguments to pass to a module. The expected format is "
+ "\"<module-name>:<arg-name>:<arg-value>\"",
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/suite/ModuleRepoSuite.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/suite/ModuleRepoSuite.java
index acfb80b..6b697d1 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/suite/ModuleRepoSuite.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/suite/ModuleRepoSuite.java
@@ -91,14 +91,13 @@
// Need to generate a different config for each ABI as we cannot guarantee the
// configs are idempotent. This however means we parse the same file multiple times
for (IAbi abi : abis) {
- IConfiguration config = mConfigFactory.createConfigurationFromArgs(pathArg);
String id = AbiUtils.createId(abi.getName(), name);
if (!shouldRunModule(id)) {
// If the module should not run tests based on the state of filters,
// skip this name/abi combination.
continue;
}
-
+ IConfiguration config = mConfigFactory.createConfigurationFromArgs(pathArg);
Map<String, List<String>> args = new HashMap<>();
if (mModuleArgs.containsKey(name)) {
args.putAll(mModuleArgs.get(name));