Merge "Update auto-gen test config template with EXTRA_CONFIGS placeholder"

This commit is contained in:
Dan Shi 2019-06-14 22:21:39 +00:00 committed by Gerrit Code Review
commit fde58bccbc
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): PRIVATE_MODULE_NAME := $(LOCAL_MODULE)
$(autogen_test_config_file) : $(autogen_test_config_template) $(autogen_test_config_file) : $(autogen_test_config_template)
@echo "Auto generating test config $(notdir $@)" @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 my_auto_generate_config := true
else else
# Auto generating test config file for instrumentation test # Auto generating test config file for instrumentation test

View file

@ -22,6 +22,8 @@
<option name="test-file-name" value="{MODULE}.apk" /> <option name="test-file-name" value="{MODULE}.apk" />
</target_preparer> </target_preparer>
{EXTRA_CONFIGS}
<test class="com.android.tradefed.testtype.{TEST_TYPE}" > <test class="com.android.tradefed.testtype.{TEST_TYPE}" >
<option name="package" value="{PACKAGE}" /> <option name="package" value="{PACKAGE}" />
<option name="runner" value="{RUNNER}" /> <option name="runner" value="{RUNNER}" />

View file

@ -17,6 +17,9 @@
<configuration description="Runs {MODULE}"> <configuration description="Runs {MODULE}">
<option name="test-suite-tag" value="apct" /> <option name="test-suite-tag" value="apct" />
<option name="test-suite-tag" value="apct-junit" /> <option name="test-suite-tag" value="apct-junit" />
{EXTRA_CONFIGS}
<test class="com.android.tradefed.testtype.HostTest" > <test class="com.android.tradefed.testtype.HostTest" >
<option name="jar" value="{MODULE}.jar" /> <option name="jar" value="{MODULE}.jar" />
</test> </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="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" /> <option name="push" value="{MODULE}.jar->/data/local/tmp/{MODULE}/{MODULE}.jar" />
</target_preparer> </target_preparer>
{EXTRA_CONFIGS}
<test class="com.android.compatibility.testtype.DalvikTest" > <test class="com.android.compatibility.testtype.DalvikTest" >
<option name="run-name" value="{MODULE}" /> <option name="run-name" value="{MODULE}" />
<option name="classpath" value="/data/local/tmp/{MODULE}/{MODULE}.jar" /> <option name="classpath" value="/data/local/tmp/{MODULE}/{MODULE}.jar" />

View file

@ -17,6 +17,9 @@
<configuration description="Runs {MODULE}."> <configuration description="Runs {MODULE}.">
<option name="test-suite-tag" value="apct" /> <option name="test-suite-tag" value="apct" />
<option name="test-suite-tag" value="apct-native-metric" /> <option name="test-suite-tag" value="apct-native-metric" />
{EXTRA_CONFIGS}
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" /> <option name="cleanup" value="true" />
<option name="push" value="{MODULE}->/data/local/tmp/{MODULE}" /> <option name="push" value="{MODULE}->/data/local/tmp/{MODULE}" />

View file

@ -16,6 +16,9 @@
<!-- This test config file is auto-generated. --> <!-- This test config file is auto-generated. -->
<configuration description="Runs {MODULE}."> <configuration description="Runs {MODULE}.">
<option name="null-device" value="true" /> <option name="null-device" value="true" />
{EXTRA_CONFIGS}
<test class="com.android.tradefed.testtype.HostGTest" > <test class="com.android.tradefed.testtype.HostGTest" >
<option name="module-name" value="{MODULE}" /> <option name="module-name" value="{MODULE}" />
</test> </test>

View file

@ -18,7 +18,7 @@
<option name="test-suite-tag" value="apct" /> <option name="test-suite-tag" value="apct" />
<option name="test-suite-tag" value="apct-native" /> <option name="test-suite-tag" value="apct-native" />
{EXTRA_OPTIONS} {EXTRA_CONFIGS}
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" /> <option name="cleanup" value="true" />