diff options
Diffstat (limited to 'sdksandbox/tests/cts/endtoendtests/AndroidTest.xml')
-rw-r--r-- | sdksandbox/tests/cts/endtoendtests/AndroidTest.xml | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sdksandbox/tests/cts/endtoendtests/AndroidTest.xml b/sdksandbox/tests/cts/endtoendtests/AndroidTest.xml index 04237b6c14..8d58b9c565 100644 --- a/sdksandbox/tests/cts/endtoendtests/AndroidTest.xml +++ b/sdksandbox/tests/cts/endtoendtests/AndroidTest.xml @@ -20,6 +20,24 @@ <option name="config-descriptor:metadata" key="parameter" value="not_instant_app"/> <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi"/> <option name="config-descriptor:metadata" key="parameter" value="secondary_user"/> + <option name="test-user-token" value="%TEST_USER%"/> + + <!-- IMPORTANT: This needs to come before SuiteApkInstaller + + SuiteApkInstaller is not able to uninstall the Sdk-Provider.apk because the test + app that requires it is still installed at that point. This means the apk would + stay on the test device after the test ends. + + This preparer, during tear down, runs after SuiteApkInstaller and will finally + uninstall the provider, leaving the device in a clean state. + + See b/314294893 for more details. + --> + <target_preparer + class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> + <option name="teardown-command" + value="pm --user %TEST_USER% uninstall com.android.ctssdkprovider"/> + </target_preparer> <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> <option name="cleanup-apks" value="true"/> @@ -41,7 +59,6 @@ <option name="teardown-command" value="cmd sdk_sandbox set-state --reset" /> </target_preparer> - <object type="module_controller" class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController" > <option name="mainline-module-package-name" value="com.google.android.adservices" /> |