aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Shi <dshi@google.com>2019-06-06 16:20:12 -0700
committerDan Shi <dshi@google.com>2019-07-15 17:29:42 +0000
commit8d5459fc6d6fd06e9012afb626dc4a7c12338e71 (patch)
tree7047a50d5e63f2dc94e976928bec99020c39f1a6
parent3538cebfc7ab5681726fe6d15fd9e5baf6fad6a2 (diff)
downloadbuild-8d5459fc6d6fd06e9012afb626dc4a7c12338e71.tar.gz
Update auto-gen test config template with EXTRA_CONFIGS placeholder
Bug: 134509111 Bug: 136633978 Test: add "require_root: true" to init_benchmarks and libpower_test build the modules, confirm the extra target preparer is added in the test config. Change-Id: I2fdae79d45fd1e5866ee94d1f0e59df106be2a87 Merged-In: I2fdae79d45fd1e5866ee94d1f0e59df106be2a87
-rw-r--r--core/autogen_test_config.mk2
-rw-r--r--core/instrumentation_test_config_template.xml2
-rw-r--r--core/java_host_test_config_template.xml3
-rw-r--r--core/java_test_config_template.xml3
-rw-r--r--core/native_benchmark_test_config_template.xml3
-rw-r--r--core/native_host_test_config_template.xml3
-rw-r--r--core/native_test_config_template.xml2
7 files changed, 16 insertions, 2 deletions
diff --git a/core/autogen_test_config.mk b/core/autogen_test_config.mk
index 6d751322bd..d4ca56f1b8 100644
--- a/core/autogen_test_config.mk
+++ b/core/autogen_test_config.mk
@@ -36,7 +36,7 @@ endif
$(autogen_test_config_file): PRIVATE_MODULE_NAME := $(LOCAL_MODULE)
$(autogen_test_config_file) : $(autogen_test_config_template)
@echo "Auto generating test config $(notdir $@)"
- $(hide) sed 's&{MODULE}&$(PRIVATE_MODULE_NAME)&g;s&{EXTRA_OPTIONS}&&g' $< > $@
+ $(hide) sed 's&{MODULE}&$(PRIVATE_MODULE_NAME)&g;s&{EXTRA_CONFIGS}&&g' $< > $@
my_auto_generate_config := true
else
# Auto generating test config file for instrumentation test
diff --git a/core/instrumentation_test_config_template.xml b/core/instrumentation_test_config_template.xml
index 18ea676af0..afaa561e7e 100644
--- a/core/instrumentation_test_config_template.xml
+++ b/core/instrumentation_test_config_template.xml
@@ -22,6 +22,8 @@
<option name="test-file-name" value="{MODULE}.apk" />
</target_preparer>
+ {EXTRA_CONFIGS}
+
<test class="com.android.tradefed.testtype.{TEST_TYPE}" >
<option name="package" value="{PACKAGE}" />
<option name="runner" value="{RUNNER}" />
diff --git a/core/java_host_test_config_template.xml b/core/java_host_test_config_template.xml
index d808001840..26c1cafa32 100644
--- a/core/java_host_test_config_template.xml
+++ b/core/java_host_test_config_template.xml
@@ -17,6 +17,9 @@
<configuration description="Runs {MODULE}">
<option name="test-suite-tag" value="apct" />
<option name="test-suite-tag" value="apct-junit" />
+
+ {EXTRA_CONFIGS}
+
<test class="com.android.tradefed.testtype.HostTest" >
<option name="jar" value="{MODULE}.jar" />
</test>
diff --git a/core/java_test_config_template.xml b/core/java_test_config_template.xml
index 4ee5b07218..811cf93540 100644
--- a/core/java_test_config_template.xml
+++ b/core/java_test_config_template.xml
@@ -22,6 +22,9 @@
<option name="push" value="cts-dalvik-device-test-runner.jar->/data/local/tmp/{MODULE}/cts-dalvik-device-test-runner.jar" />
<option name="push" value="{MODULE}.jar->/data/local/tmp/{MODULE}/{MODULE}.jar" />
</target_preparer>
+
+ {EXTRA_CONFIGS}
+
<test class="com.android.compatibility.testtype.DalvikTest" >
<option name="run-name" value="{MODULE}" />
<option name="classpath" value="/data/local/tmp/{MODULE}/{MODULE}.jar" />
diff --git a/core/native_benchmark_test_config_template.xml b/core/native_benchmark_test_config_template.xml
index 18736bfdfc..d1f01996bd 100644
--- a/core/native_benchmark_test_config_template.xml
+++ b/core/native_benchmark_test_config_template.xml
@@ -17,6 +17,9 @@
<configuration description="Runs {MODULE}.">
<option name="test-suite-tag" value="apct" />
<option name="test-suite-tag" value="apct-native-metric" />
+
+ {EXTRA_CONFIGS}
+
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" />
<option name="push" value="{MODULE}->/data/local/tmp/{MODULE}" />
diff --git a/core/native_host_test_config_template.xml b/core/native_host_test_config_template.xml
index c0fcd1af6f..818b9b9f4c 100644
--- a/core/native_host_test_config_template.xml
+++ b/core/native_host_test_config_template.xml
@@ -16,6 +16,9 @@
<!-- This test config file is auto-generated. -->
<configuration description="Runs {MODULE}.">
<option name="null-device" value="true" />
+
+ {EXTRA_CONFIGS}
+
<test class="com.android.tradefed.testtype.HostGTest" >
<option name="module-name" value="{MODULE}" />
</test>
diff --git a/core/native_test_config_template.xml b/core/native_test_config_template.xml
index f3d3231006..ef1818f776 100644
--- a/core/native_test_config_template.xml
+++ b/core/native_test_config_template.xml
@@ -18,7 +18,7 @@
<option name="test-suite-tag" value="apct" />
<option name="test-suite-tag" value="apct-native" />
- {EXTRA_OPTIONS}
+ {EXTRA_CONFIGS}
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" />