summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Holden <aaronholden@google.com>2016-06-24 22:13:07 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-06-24 22:13:08 +0000
commit409af0dbfe8d1410bc8d62764a136add84dc4524 (patch)
tree038073e5958a40e5ca96883fc0c530575304382d
parent325ad122bef3596fc6077275d6d87f83e39015e7 (diff)
parent4c748012f6959f3f2783df0457ce23b040ece910 (diff)
downloadcts-409af0dbfe8d1410bc8d62764a136add84dc4524.tar.gz
Merge "DynamicConfigPusher 'version' option default value" into nyc-dev
-rw-r--r--common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/DynamicConfigPusher.java11
-rw-r--r--tools/cts-tradefed/res/config/cts-preconditions.xml1
2 files changed, 8 insertions, 4 deletions
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/DynamicConfigPusher.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/DynamicConfigPusher.java
index a19324d1d7a..a422525321c 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/DynamicConfigPusher.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/DynamicConfigPusher.java
@@ -56,14 +56,15 @@ public class DynamicConfigPusher implements ITargetCleaner {
private boolean mCleanup = true;
@Option(name="config-filename", description = "The module name for module-level " +
- "configurations, or the suite name for suite-level configurations")
+ "configurations, or the suite name for suite-level configurations", mandatory = true)
private String mModuleName;
- @Option(name = "target", description = "The test target, \"device\" or \"host\"")
+ @Option(name = "target", description = "The test target, \"device\" or \"host\"",
+ mandatory = true)
private TestTarget mTarget;
@Option(name = "version", description = "The version of the configuration to retrieve " +
- "from the server, e.g. \"1\"")
+ "from the server, e.g. \"1.0\". Defaults to suite version string.")
private static String mVersion;
@@ -90,6 +91,10 @@ public class DynamicConfigPusher implements ITargetCleaner {
"Cannot get local dynamic config file from test directory", e);
}
+ if (mVersion == null) {
+ mVersion = buildHelper.getSuiteVersion();
+ }
+
String apfeConfigInJson = null;
String originUrl = buildHelper.getDynamicConfigUrl();
diff --git a/tools/cts-tradefed/res/config/cts-preconditions.xml b/tools/cts-tradefed/res/config/cts-preconditions.xml
index d690bad7750..4121976b917 100644
--- a/tools/cts-tradefed/res/config/cts-preconditions.xml
+++ b/tools/cts-tradefed/res/config/cts-preconditions.xml
@@ -20,7 +20,6 @@
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.DynamicConfigPusher">
<option name="target" value="host" />
<option name="config-filename" value="cts"/>
- <option name="version" value="7.0"/>
</target_preparer>
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.StayAwakePreparer" />