xref: /aosp_15_r20/cts/tests/appsearch/Android.bp (revision b7c941bb3fa97aba169d73cee0bed2de8ac964bf)
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    ],
51    per_testcase_directory: true,
52    min_sdk_version: "31",
53    // For testing @SystemApi(client = MODULE_LIBRARIES) APIs
54    platform_apis: true,
55}
56
57android_test_helper_app {
58    name: "CtsAppSearchTestHelperA",
59    defaults: ["cts_defaults"],
60    static_libs: [
61        "CtsAppSearchTestUtils",
62        "androidx.test.ext.junit",
63        "androidx.test.rules",
64        "compatibility-device-util-axt",
65        "testng",
66    ],
67    srcs: [
68        "helper-app/src/**/*.java",
69        ":CtsAppSearchTestsAidl",
70    ],
71    test_suites: [
72        "general-tests",
73        "mts-appsearch",
74    ],
75    manifest: "helper-app/AndroidManifest.xml",
76    aaptflags: [
77        "--rename-manifest-package com.android.cts.appsearch.helper.a",
78    ],
79    certificate: ":cts-appsearch-helper-cert-a",
80    sdk_version: "test_current",
81    min_sdk_version: "31",
82}
83
84android_test_helper_app {
85    name: "CtsAppSearchTestHelperB",
86    defaults: ["cts_defaults"],
87    static_libs: [
88        "CtsAppSearchTestUtils",
89        "androidx.test.ext.junit",
90        "androidx.test.rules",
91        "compatibility-device-util-axt",
92        "testng",
93    ],
94    srcs: [
95        "helper-app/src/**/*.java",
96        ":CtsAppSearchTestsAidl",
97    ],
98    test_suites: [
99        "general-tests",
100        "mts-appsearch",
101    ],
102    manifest: "helper-app/AndroidManifest.xml",
103    aaptflags: [
104        "--rename-manifest-package com.android.cts.appsearch.helper.b",
105    ],
106    certificate: ":cts-appsearch-helper-cert-b",
107    sdk_version: "test_current",
108    min_sdk_version: "31",
109}
110
111android_test_helper_app {
112    name: "CtsAppSearchIndexerTestAppAV1",
113    defaults: ["cts_defaults"],
114    srcs: [
115        "indexer-test-app/src/**/*.java",
116    ],
117    test_suites: [
118        "general-tests",
119        "mts-appsearch",
120    ],
121    manifest: "indexer-test-app/AndroidManifest_A_v1.xml",
122    certificate: ":cts-appsearch-helper-cert-a",
123    sdk_version: "test_current",
124    min_sdk_version: "31",
125}
126
127android_test_helper_app {
128    name: "CtsAppSearchIndexerTestAppAV2",
129    defaults: ["cts_defaults"],
130    srcs: [
131        "indexer-test-app/src/**/*.java",
132    ],
133    test_suites: [
134        "general-tests",
135        "mts-appsearch",
136    ],
137    asset_dirs: ["indexer-test-app/asset_dir_a_v2"],
138    manifest: "indexer-test-app/AndroidManifest_A_v2.xml",
139    certificate: ":cts-appsearch-helper-cert-a",
140    sdk_version: "test_current",
141    min_sdk_version: "31",
142}
143
144android_test_helper_app {
145    name: "CtsAppSearchIndexerTestAppAV3",
146    defaults: ["cts_defaults"],
147    srcs: [
148        "indexer-test-app/src/**/*.java",
149    ],
150    test_suites: [
151        "general-tests",
152        "mts-appsearch",
153    ],
154    asset_dirs: ["indexer-test-app/asset_dir_a_v3"],
155    manifest: "indexer-test-app/AndroidManifest_A_v3.xml",
156    certificate: ":cts-appsearch-helper-cert-a",
157    sdk_version: "test_current",
158    min_sdk_version: "31",
159}
160
161android_test_helper_app {
162    name: "CtsAppSearchIndexerTestAppBV1",
163    defaults: ["cts_defaults"],
164    srcs: [
165        "indexer-test-app/src/**/*.java",
166    ],
167    test_suites: [
168        "general-tests",
169        "mts-appsearch",
170    ],
171    asset_dirs: ["indexer-test-app/asset_dir_b_v1"],
172    manifest: "indexer-test-app/AndroidManifest_B_v1.xml",
173    certificate: ":cts-appsearch-helper-cert-b",
174    sdk_version: "test_current",
175    min_sdk_version: "31",
176}
177
178filegroup {
179    name: "CtsAppSearchTestsAidl",
180    srcs: [
181        "aidl/**/*.aidl",
182    ],
183}
184