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
gugelfrei-debug
Dan Shi 5 years ago
parent 3538cebfc7
commit 8d5459fc6d

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

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

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

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

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

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

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

Loading…
Cancel
Save