• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2019 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_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19android_test {
20    name: "CtsAppSearchTestCases",
21    team: "trendy_team_appsearch",
22    defaults: ["cts_defaults"],
23    static_libs: [
24        "androidx.test.ext.junit",
25        "androidx.test.rules",
26        "appsearch_flags_java_lib",
27        "compatibility-device-util-axt",
28        "CtsAppSearchTestUtils",
29        "flag-junit",
30        "bedstead-enterprise",
31        "testng",
32    ],
33    srcs: [
34        "src/**/*.java",
35        ":CtsAppSearchTestsAidl",
36    ],
37    test_suites: [
38        "cts",
39        "general-tests",
40        "mts-appsearch",
41        "mcts-appsearch",
42    ],
43    data: [
44        ":CtsAppSearchTestHelperA",
45        ":CtsAppSearchTestHelperB",
46        ":CtsAppSearchIndexerTestAppAV1",
47        ":CtsAppSearchIndexerTestAppAV2",
48        ":CtsAppSearchIndexerTestAppAV3",
49        ":CtsAppSearchIndexerTestAppBV1",
50        ":CtsAppSearchIndexerTestAppADynamicSchema",
51        ":CtsAppSearchIndexerTestAppADynamicSchemaFewerTypes",
52        ":CtsAppSearchIndexerTestAppADynamicSchemaMultipleRootSchemas",
53        ":CtsAppSearchIndexerTestAppBDynamicSchema",
54    ],
55    per_testcase_directory: true,
56    min_sdk_version: "31",
57    // For testing @SystemApi(client = MODULE_LIBRARIES) APIs
58    platform_apis: true,
59}
60
61android_test_helper_app {
62    name: "CtsAppSearchTestHelperA",
63    defaults: ["cts_defaults"],
64    static_libs: [
65        "CtsAppSearchTestUtils",
66        "androidx.test.ext.junit",
67        "androidx.test.rules",
68        "compatibility-device-util-axt",
69        "testng",
70    ],
71    srcs: [
72        "helper-app/src/**/*.java",
73        ":CtsAppSearchTestsAidl",
74    ],
75    test_suites: [
76        "general-tests",
77        "mts-appsearch",
78    ],
79    manifest: "helper-app/AndroidManifest.xml",
80    aaptflags: [
81        "--rename-manifest-package com.android.cts.appsearch.helper.a",
82    ],
83    certificate: ":cts-appsearch-helper-cert-a",
84    sdk_version: "test_current",
85    min_sdk_version: "31",
86}
87
88android_test_helper_app {
89    name: "CtsAppSearchTestHelperB",
90    defaults: ["cts_defaults"],
91    static_libs: [
92        "CtsAppSearchTestUtils",
93        "androidx.test.ext.junit",
94        "androidx.test.rules",
95        "compatibility-device-util-axt",
96        "testng",
97    ],
98    srcs: [
99        "helper-app/src/**/*.java",
100        ":CtsAppSearchTestsAidl",
101    ],
102    test_suites: [
103        "general-tests",
104        "mts-appsearch",
105    ],
106    manifest: "helper-app/AndroidManifest.xml",
107    aaptflags: [
108        "--rename-manifest-package com.android.cts.appsearch.helper.b",
109    ],
110    certificate: ":cts-appsearch-helper-cert-b",
111    sdk_version: "test_current",
112    min_sdk_version: "31",
113}
114
115android_test_helper_app {
116    name: "CtsAppSearchIndexerTestAppAV1",
117    defaults: ["cts_defaults"],
118    srcs: [
119        "indexer-test-app/src/**/*.java",
120    ],
121    test_suites: [
122        "general-tests",
123        "mts-appsearch",
124    ],
125    manifest: "indexer-test-app/AndroidManifest_A_v1.xml",
126    certificate: ":cts-appsearch-helper-cert-a",
127    sdk_version: "test_current",
128    min_sdk_version: "31",
129}
130
131android_test_helper_app {
132    name: "CtsAppSearchIndexerTestAppAV2",
133    defaults: ["cts_defaults"],
134    srcs: [
135        "indexer-test-app/src/**/*.java",
136    ],
137    test_suites: [
138        "general-tests",
139        "mts-appsearch",
140    ],
141    asset_dirs: ["indexer-test-app/asset_dir_a_v2"],
142    manifest: "indexer-test-app/AndroidManifest_A_v2.xml",
143    certificate: ":cts-appsearch-helper-cert-a",
144    sdk_version: "test_current",
145    min_sdk_version: "31",
146}
147
148android_test_helper_app {
149    name: "CtsAppSearchIndexerTestAppAV3",
150    defaults: ["cts_defaults"],
151    srcs: [
152        "indexer-test-app/src/**/*.java",
153    ],
154    test_suites: [
155        "general-tests",
156        "mts-appsearch",
157    ],
158    asset_dirs: ["indexer-test-app/asset_dir_a_v3"],
159    manifest: "indexer-test-app/AndroidManifest_A_v3.xml",
160    certificate: ":cts-appsearch-helper-cert-a",
161    sdk_version: "test_current",
162    min_sdk_version: "31",
163}
164
165android_test_helper_app {
166    name: "CtsAppSearchIndexerTestAppBV1",
167    defaults: ["cts_defaults"],
168    srcs: [
169        "indexer-test-app/src/**/*.java",
170    ],
171    test_suites: [
172        "general-tests",
173        "mts-appsearch",
174    ],
175    asset_dirs: ["indexer-test-app/asset_dir_b_v1"],
176    manifest: "indexer-test-app/AndroidManifest_B_v1.xml",
177    certificate: ":cts-appsearch-helper-cert-b",
178    sdk_version: "test_current",
179    min_sdk_version: "31",
180}
181
182android_test_helper_app {
183    name: "CtsAppSearchIndexerTestAppADynamicSchema",
184    defaults: ["cts_defaults"],
185    srcs: [
186        "indexer-test-app/src/**/*.java",
187    ],
188    test_suites: [
189        "general-tests",
190        "mts-appsearch",
191    ],
192    asset_dirs: ["indexer-test-app/asset_dir_a_dynamic_schema"],
193    manifest: "indexer-test-app/AndroidManifest_A_dynamic_schema.xml",
194    certificate: ":cts-appsearch-helper-cert-a",
195    sdk_version: "test_current",
196    min_sdk_version: "31",
197}
198
199android_test_helper_app {
200    name: "CtsAppSearchIndexerTestAppADynamicSchemaFewerTypes",
201    defaults: ["cts_defaults"],
202    srcs: [
203        "indexer-test-app/src/**/*.java",
204    ],
205    test_suites: [
206        "general-tests",
207        "mts-appsearch",
208    ],
209    asset_dirs: ["indexer-test-app/asset_dir_a_dynamic_schema_fewer_types"],
210    manifest: "indexer-test-app/AndroidManifest_A_dynamic_schema_fewer_types.xml",
211    certificate: ":cts-appsearch-helper-cert-a",
212    sdk_version: "test_current",
213    min_sdk_version: "31",
214}
215
216android_test_helper_app {
217    name: "CtsAppSearchIndexerTestAppADynamicSchemaMultipleRootSchemas",
218    defaults: ["cts_defaults"],
219    srcs: [
220        "indexer-test-app/src/**/*.java",
221    ],
222    test_suites: [
223        "general-tests",
224        "mts-appsearch",
225    ],
226    asset_dirs: ["indexer-test-app/asset_dir_a_dynamic_schema_multiple_root_schemas"],
227    manifest: "indexer-test-app/AndroidManifest_A_dynamic_schema_multiple_root_schemas.xml",
228    certificate: ":cts-appsearch-helper-cert-a",
229    sdk_version: "test_current",
230    min_sdk_version: "31",
231}
232
233android_test_helper_app {
234    name: "CtsAppSearchIndexerTestAppBDynamicSchema",
235    defaults: ["cts_defaults"],
236    srcs: [
237        "indexer-test-app/src/**/*.java",
238    ],
239    test_suites: [
240        "general-tests",
241        "mts-appsearch",
242    ],
243    asset_dirs: ["indexer-test-app/asset_dir_b_dynamic_schema"],
244    manifest: "indexer-test-app/AndroidManifest_B_dynamic_schema.xml",
245    certificate: ":cts-appsearch-helper-cert-b",
246    sdk_version: "test_current",
247    min_sdk_version: "31",
248}
249
250filegroup {
251    name: "CtsAppSearchTestsAidl",
252    srcs: [
253        "aidl/**/*.aidl",
254    ],
255}
256