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 CTS AdServices test cases">
18    <option name="test-suite-tag" value="cts" />
19    <option name="config-descriptor:metadata" key="component" value="adservices" />
20    <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
21    <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi" />
22    <option name="config-descriptor:metadata" key="parameter" value="secondary_user" />
23
24    <!-- For this test suite to get picked up in mainline presubmit -->
25    <option name="config-descriptor:metadata" key="mainline-param"
26        value="com.google.android.adservices.apex" />
27
28    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
29        <option name="cleanup-apks" value="true" />
30        <option name="test-file-name" value="CtsAdServicesRootTestCases.apk" />
31    </target_preparer>
32
33    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
34        <option name="run-command" value="setprop log.tag.adservices VERBOSE"/>
35        <option name="run-command" value="setprop log.tag.adservices.topics VERBOSE"/>
36        <option name="run-command" value="setprop log.tag.adservices.fledge VERBOSE"/>
37        <option name="run-command" value="setprop log.tag.adservices.measurement VERBOSE"/>
38
39        <!-- Disable kill switches to ignore the effect of actual PH values. -->
40        <option name="run-command" value="device_config put adservices global_kill_switch false" />
41        <option name="run-command" value="device_config put adservices fledge_select_ads_kill_switch false" />
42        <option name="run-command" value="device_config put adservices fledge_custom_audience_service_kill_switch false" />
43
44        <!-- Override Consent notification to debug mode to grant user consent -->
45        <option name="run-command" value="setprop debug.adservices.consent_notified_debug_mode true"/>
46        <option name="teardown-command" value="setprop debug.adservices.consent_notified_debug_mode false"/>
47
48        <!-- Override Consent Manager to debug mode to grant user consent -->
49        <option name="run-command" value="setprop debug.adservices.consent_manager_debug_mode true" />
50        <option name="teardown-command" value="setprop debug.adservices.consent_manager_debug_mode false"/>
51
52        <!-- Override MDD background job to avoid race condition. -->
53        <option name="run-command"
54                value="device_config put adservices mdd_background_task_kill_switch true"/>
55        <option name="teardown-command"
56                value="device_config put adservices mdd_background_task_kill_switch false"/>
57
58        <!-- Force enable enrollment checks for FLEDGE when testing enrollment -->
59        <option name="run-command" value="device_config put adservices disable_fledge_enrollment_check false" />
60
61        <!-- Increase the allowed API queries per second -->
62        <option name="run-command" value="device_config put adservices sdk_request_permits_per_second 100000" />
63        <option name="teardown-command" value="device_config put adservices sdk_request_permits_per_second 1" />
64
65        <!-- Temporarily disable Device Config sync -->
66        <option name="run-command" value="device_config set_sync_disabled_for_tests persistent" />
67        <option name="teardown-command" value="device_config set_sync_disabled_for_tests none" />
68
69        <!-- Temporarily enable enrollment seed for testing -->
70        <option name="run-command"
71                value="device_config put adservices enable_enrollment_test_seed true" />
72        <option name="teardown-command"
73                value="device_config put adservices enable_enrollment_test_seed false" />
74
75        <!-- Disable Register Ad Beacon Feature -->
76        <option name="run-command" value="device_config put adservices fledge_register_ad_beacon_enabled false" />
77    </target_preparer>
78
79    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
80        <option name="package" value="android.adservices.rootcts" />
81    </test>
82
83    <object type="module_controller"
84            class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController" >
85        <option name="mainline-module-package-name" value="com.google.android.adservices" />
86    </object>
87    <option name="config-descriptor:metadata" key="mainline-param" value="com.google.android.adservices.apex" />
88</configuration>
89
90