xref: /aosp_15_r20/cts/hostsidetests/devicepolicy/Android.bp (revision b7c941bb3fa97aba169d73cee0bed2de8ac964bf)
1// Copyright (C) 2014 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16    default_team: "trendy_team_enterprise",
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20java_test_host {
21    name: "CtsDevicePolicyManagerTestCases",
22    defaults: ["cts_defaults"],
23    srcs: ["src/**/*.java"],
24    libs: [
25        "tools-common-prebuilt",
26        "cts-tradefed",
27        "tradefed",
28        "guava",
29        "truth",
30    ],
31    // tag this module as a cts test artifact
32    test_suites: [
33        "arcts",
34        "cts",
35        "general-tests",
36        "mts-permission",
37    ],
38    static_libs: [
39        "cts-statsd-atom-host-test-utils",
40        "flag-junit-host",
41        "device_policy_aconfig_flags_lib_host",
42        "android.permission.flags-aconfig-java-host",
43    ],
44    java_resource_dirs: ["res"],
45    device_common_data: [
46        ":cts-current-api-gz",
47        ":CtsCertInstallerApp",
48        ":CtsContactDirectoryProvider",
49        ":CtsCorpOwnedManagedProfile",
50        ":CtsCorpOwnedManagedProfile2",
51        ":CtsCrossProfileEnabledApp",
52        ":CtsCrossProfileUserEnabledApp",
53        ":CtsDelegateApp",
54        ":CtsDeviceAdminApp23",
55        ":CtsDeviceAdminApp24",
56        ":CtsDeviceAdminApp29",
57        ":CtsDeviceAdminService2",
58        ":CtsDeviceAdminService4",
59        ":CtsDeviceAdminServiceB",
60        ":CtsDeviceAndProfileOwnerApp",
61        ":CtsDeviceAndProfileOwnerApp23",
62        ":CtsDeviceAndProfileOwnerApp25",
63        ":CtsDeviceAndProfileOwnerApp30",
64        ":CtsDeviceOwnerApp",
65        ":CtsDeviceAdminService1",
66        ":CtsDeviceAdminService2",
67        ":CtsDeviceAdminService3",
68        ":CtsDevicePolicyAssistApp",
69        ":CtsDevicePolicyAutofillApp",
70        ":CtsEmptyTestApp",
71        ":CtsHasLauncherActivityApp",
72        ":CtsIntentReceiverApp",
73        ":CtsIntentSenderApp",
74        ":CtsLauncherAppsTests",
75        ":CtsLauncherAppsTestsSupport",
76        ":CtsManagedProfileApp",
77        ":CtsMeteredDataTestApp",
78        ":CtsNoLauncherActivityApp",
79        ":CtsNoPermissionApp",
80        ":CtsNotificationSenderApp",
81        ":CtsPackageInstallerApp",
82        ":CtsPermissionApp",
83        ":CtsProfileOwnerApp",
84        ":CtsSimpleApp",
85        ":CtsSimplePreMApp",
86        ":CtsTransferOwnerIncomingApp",
87        ":CtsTransferOwnerOutgoingApp",
88        ":CtsVpnFirewallApp",
89        ":CtsVpnFirewallAppApi23",
90        ":CtsVpnFirewallAppApi24",
91        ":CtsVpnFirewallAppNotAlwaysOn",
92        ":CtsWidgetProviderApp",
93        ":CtsWifiConfigCreator",
94        ":SharingApp1",
95        ":SharingApp2",
96        ":SharedUidApp1",
97        ":SharedUidApp2",
98        ":SimpleSmsApp",
99        ":TestApp1",
100        ":TestApp2",
101        ":TestApp3",
102        ":TestApp4",
103        ":TestIme",
104    ],
105    per_testcase_directory: true,
106}
107
108test_module_config_host {
109    name: "CtsDevicePolicyManagerTestCases_Permissions",
110    base: "CtsDevicePolicyManagerTestCases",
111    test_suites: ["general-tests"],
112    include_annotations: ["com.android.cts.devicepolicy.annotations.PermissionsTest"],
113}
114
115test_module_config_host {
116    name: "CtsDevicePolicyManagerTestCases_Permissions_NoFlakes",
117    base: "CtsDevicePolicyManagerTestCases",
118    test_suites: ["general-tests"],
119    include_annotations: ["com.android.cts.devicepolicy.annotations.PermissionsTest"],
120    exclude_annotations: ["android.platform.test.annotations.FlakyTest"],
121}
122
123// Currently, there are no tests marked flaky or large in CtsDevicePolicyManagerTestCases
124test_module_config_host {
125    name: "CtsDevicePolicyManagerTestCases_NoFlakes_NoLarge",
126    base: "CtsDevicePolicyManagerTestCases",
127    test_suites: ["general-tests"],
128    exclude_annotations: [
129        "android.platform.test.annotations.FlakyTest",
130        "android.platform.test.annotations.LargeTest",
131    ],
132}
133
134test_module_config_host {
135    name: "CtsDevicePolicyManagerTestCases_LockSettings_NoFlakes",
136    base: "CtsDevicePolicyManagerTestCases",
137    test_suites: ["general-tests"],
138    include_annotations: ["com.android.cts.devicepolicy.annotations.LockSettingsTest"],
139    exclude_annotations: ["android.platform.test.annotations.FlakyTest"],
140}
141
142test_module_config_host {
143    name: "CtsDevicePolicyManagerTestCases_ParentProfileApiDisabled",
144    base: "CtsDevicePolicyManagerTestCases",
145    test_suites: ["general-tests"],
146    include_filters: ["com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled"],
147}
148
149test_module_config_host {
150    name: "CtsDevicePolicyManagerTestCases_LockSettingsTest",
151    base: "CtsDevicePolicyManagerTestCases",
152    test_suites: ["general-tests"],
153    include_annotations: ["com.android.cts.devicepolicy.annotations.LockSettingsTest"],
154}
155
156test_module_config_host {
157    name: "CtsDevicePolicyManagerTestCases_PermissionsTest",
158    base: "CtsDevicePolicyManagerTestCases",
159    test_suites: ["general-tests"],
160    include_annotations: ["com.android.cts.devicepolicy.annotations.PermissionsTest"],
161}
162