1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2023 The Android Open Source Project 4 ~ 5 ~ Licensed under the Apache License, Version 2.0 (the "License"); 6 ~ you may not use this file except in compliance with the License. 7 ~ You may obtain a copy of the License at 8 ~ 9 ~ http://www.apache.org/licenses/LICENSE-2.0 10 ~ 11 ~ Unless required by applicable law or agreed to in writing, software 12 ~ distributed under the License is distributed on an "AS IS" BASIS, 13 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 ~ See the License for the specific language governing permissions and 15 ~ limitations under the License. 16 --> 17<configuration description="Config for Ad Services Settings App test cases in ExtServices"> 18 <option name="test-tag" value="AdExtServicesApkUISettingsGaOtaTests"/> 19 <option name="config-descriptor:metadata" key="parameter" value="not_secondary_user"/> 20 <!-- disable device config sync during test --> 21 <option name="run-command" value="device_config set_sync_disabled_for_tests persistent"/> 22 <option name="run-command" value="device_config put adservices enable_back_compat true"/> 23 <option name="teardown-command" value="device_config set_sync_disabled_for_tests none"/> 24 25 <!-- Prevent test from running on Android T+ --> 26 <object type="module_controller" 27 class="com.android.tradefed.testtype.suite.module.MaxSdkModuleController"> 28 <option name="max-sdk-level" value="32"/> 29 </object> 30 31 <!-- Prevent tests from running on Android Q- --> 32 <object type="module_controller" 33 class="com.android.tradefed.testtype.suite.module.Sdk30ModuleController"/> 34 35 <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector"> 36 <option name="directory-keys" value="/sdcard/Documents/adservices-tests" /> 37 <option name="clean-up" value="false" /> 38 <option name="collect-on-run-ended-only" value="true" /> 39 </metrics_collector> 40 41 <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> 42 <option name="cleanup-apks" value="true"/> 43 <option name="test-file-name" value="AdExtServicesApkUISettingsGaUXSelectorTests.apk"/> 44 <option name="check-min-sdk" value="true"/> 45 </target_preparer> 46 47 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> 48 <option name="run-command" value="mkdir -p /data/local/tmp/cts/install"/> 49 <!-- TODO(b/279938338): change to use log level TestPreparer --> 50 <option name="run-command" value="setprop log.tag.adservices VERBOSE"/> 51 <option name="run-command" value="device_config put adservices global_kill_switch false"/> 52 <option name="run-command" value="device_config put adservices adservice_enabled true"/> 53 <option name="teardown-command" value="rm -rf /data/local/tmp/cts"/> 54 </target_preparer> 55 <target_preparer class="com.android.tradefed.targetprep.RebootTargetPreparer"> 56 <option name="pre-reboot" value="true"/> 57 </target_preparer> 58 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> 59 <option name="run-command" value="am wait-for-broadcast-idle"/> 60 </target_preparer> 61 <target_preparer class="com.android.tradefed.targetprep.DeviceSetup"> 62 <option name="force-skip-system-props" value="true"/> 63 </target_preparer> 64 65 <test class="com.android.tradefed.testtype.AndroidJUnitTest"> 66 <option name="hidden-api-checks" value="false"/> <!-- Allow hidden API uses --> 67 <option name="package" value="com.android.adextservices.tests.ui"/> 68 </test> 69 <object type="module_controller" 70 class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController"> 71 <option name="mainline-module-package-name" value="com.google.android.extservices"/> 72 </object> 73 <option name="config-descriptor:metadata" key="mainline-param" 74 value="com.google.android.extservices.apex"/> 75</configuration> 76