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
This commit is contained in:
Dan Shi 2019-06-06 16:20:12 -07:00
parent 3538cebfc7
commit 8d5459fc6d
7 changed files with 16 additions and 2 deletions

View File

@ -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

View File

@ -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}" />

View File

@ -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>

View File

@ -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" />

View File

@ -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}" />

View File

@ -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>

View File

@ -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" />