1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2022 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16<configuration description="Config for CTS AdServices test cases">
17    <option name="test-suite-tag" value="cts" />
18    <option name="config-descriptor:metadata" key="component" value="adservices" />
19    <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
20    <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi" />
21    <option name="config-descriptor:metadata" key="parameter" value="secondary_user" />
22    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
23        <option name="cleanup-apks" value="true" />
24        <option name="test-file-name" value="CtsAdServicesDeviceTestCases.apk" />
25    </target_preparer>
26
27    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
28        <option name="run-command" value="setprop log.tag.adservices VERBOSE"/>
29        <option name="run-command" value="setprop log.tag.adservices.topics VERBOSE"/>
30        <option name="run-command" value="setprop log.tag.adservices.fledge VERBOSE"/>
31        <option name="run-command" value="setprop log.tag.adservices.measurement VERBOSE"/>
32
33        <!-- Disable kill switches to ignore the effect of actual PH values. -->
34        <option name="run-command" value="device_config put adservices global_kill_switch false" />
35        <option name="run-command" value="device_config put adservices fledge_select_ads_kill_switch false" />
36        <option name="run-command" value="device_config put adservices fledge_custom_audience_service_kill_switch false" />
37        <option name="run-command" value="device_config put adservices fledge_schedule_custom_audience_update_enabled true" />
38
39        <!-- Override Consent notification to debug mode to grant user consent -->
40        <option name="run-command" value="setprop debug.adservices.consent_notified_debug_mode true"/>
41        <option name="teardown-command" value="setprop debug.adservices.consent_notified_debug_mode false"/>
42
43        <!-- Override Consent Manager to debug mode to grant user consent -->
44        <option name="run-command" value="setprop debug.adservices.consent_manager_debug_mode true" />
45        <option name="teardown-command" value="setprop debug.adservices.consent_manager_debug_mode false"/>
46
47        <!-- Override MDD background job to avoid race condition. -->
48        <option name="run-command"
49                value="device_config put adservices mdd_background_task_kill_switch true"/>
50        <option name="teardown-command"
51                value="device_config put adservices mdd_background_task_kill_switch false"/>
52
53        <!-- Force enable enrollment checks for FLEDGE when testing enrollment -->
54        <option name="run-command" value="device_config put adservices disable_fledge_enrollment_check false" />
55
56        <!-- Increase the allowed API queries per second -->
57        <option name="run-command" value="device_config put adservices sdk_request_permits_per_second 100000" />
58        <option name="teardown-command" value="device_config put adservices sdk_request_permits_per_second 1" />
59
60        <!-- Temporarily disable Device Config sync -->
61        <option name="run-command" value="device_config set_sync_disabled_for_tests persistent" />
62        <option name="teardown-command" value="device_config set_sync_disabled_for_tests none" />
63
64        <!-- Temporarily enable enrollment seed for testing -->
65        <option name="run-command"
66                value="device_config put adservices enable_enrollment_test_seed true" />
67        <option name="teardown-command"
68                value="device_config put adservices enable_enrollment_test_seed false" />
69
70        <!-- Disable Register Ad Beacon Feature -->
71        <option name="run-command" value="device_config put adservices fledge_register_ad_beacon_enabled false" />
72    </target_preparer>
73
74    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
75        <option name="package" value="android.adservices.cts" />
76    </test>
77
78    <object type="module_controller"
79            class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController" >
80        <option name="mainline-module-package-name" value="com.google.android.adservices" />
81    </object>
82    <option name="config-descriptor:metadata" key="mainline-param" value="com.google.android.adservices.apex" />
83</configuration>
84
85