blob: 51f7716d3acd7b6ea2449e7e1bf1d2a43252210a [file] [log] [blame]
Dan Willemsen4c939742016-12-06 15:44:57 -08001// Build the unit tests for installd
Bob Badour3c538232021-02-12 21:26:48 -08002package {
3 // See: http://go/android-license-faq
4 // A large-scale-change added 'default_applicable_licenses' to import
5 // all of the 'license_kinds' from "frameworks_native_license"
6 // to get the below license kinds:
7 // SPDX-license-identifier-Apache-2.0
8 default_applicable_licenses: ["frameworks_native_license"],
9}
10
Dan Willemsen4c939742016-12-06 15:44:57 -080011cc_test {
12 name: "installd_utils_test",
Andreas Gampec23dc122018-03-07 10:26:50 -080013 test_suites: ["device-tests"],
Dan Willemsen4c939742016-12-06 15:44:57 -080014 clang: true,
15 srcs: ["installd_utils_test.cpp"],
Shikha Malhotraaae96442021-11-25 10:52:50 +000016 cflags: [
17 "-Wall",
18 "-Werror",
19 ],
Dan Willemsen4c939742016-12-06 15:44:57 -080020 shared_libs: [
21 "libbase",
Dan Willemsen4c939742016-12-06 15:44:57 -080022 "libutils",
23 "libcutils",
24 ],
25 static_libs: [
Martijn Coenen6de402a2021-04-26 16:23:40 +020026 "libasync_safe",
Dan Willemsen4c939742016-12-06 15:44:57 -080027 "libdiskusage",
Arthur Eubankse1d9b282017-08-16 17:12:33 -070028 "libinstalld",
29 "liblog",
Dan Willemsen4c939742016-12-06 15:44:57 -080030 ],
Andreas Gampe75d394e2019-03-25 11:37:15 -070031 test_config: "installd_utils_test.xml",
Dan Willemsen4c939742016-12-06 15:44:57 -080032}
Jeff Sharkey871a8f22017-02-21 18:30:28 -070033
34cc_test {
35 name: "installd_cache_test",
Andreas Gampec23dc122018-03-07 10:26:50 -080036 test_suites: ["device-tests"],
Jeff Sharkey871a8f22017-02-21 18:30:28 -070037 clang: true,
38 srcs: ["installd_cache_test.cpp"],
Shikha Malhotraaae96442021-11-25 10:52:50 +000039 cflags: [
40 "-Wall",
41 "-Werror",
42 ],
Jeff Sharkey871a8f22017-02-21 18:30:28 -070043 shared_libs: [
44 "libbase",
45 "libbinder",
Alan Stokesa25d90c2017-10-16 10:56:00 +010046 "libcrypto",
Jeff Sharkey871a8f22017-02-21 18:30:28 -070047 "libcutils",
Suren Baghdasaryan1cc5de62019-01-25 05:29:23 +000048 "libprocessgroup",
Jeff Sharkey871a8f22017-02-21 18:30:28 -070049 "libselinux",
50 "libutils",
Nicolas Geoffrayaaad21e2019-02-25 13:31:10 +000051 "server_configurable_flags",
Jeff Sharkey871a8f22017-02-21 18:30:28 -070052 ],
53 static_libs: [
Martijn Coenen6de402a2021-04-26 16:23:40 +020054 "libasync_safe",
Jeff Sharkey871a8f22017-02-21 18:30:28 -070055 "libdiskusage",
Arthur Eubankse1d9b282017-08-16 17:12:33 -070056 "libinstalld",
Yang Tianping8f2a40e2021-10-29 14:39:02 +080057 "libziparchive",
Arthur Eubankse1d9b282017-08-16 17:12:33 -070058 "liblog",
59 "liblogwrap",
Jeff Sharkey871a8f22017-02-21 18:30:28 -070060 ],
Andreas Gampe75d394e2019-03-25 11:37:15 -070061 test_config: "installd_cache_test.xml",
Boleyn Su6ae7c462020-10-20 18:40:40 +090062
63 product_variables: {
64 arc: {
65 exclude_srcs: [
66 "QuotaUtils.cpp",
67 ],
68 static_libs: [
69 "libarcdiskquota",
70 "arc_services_aidl",
71 ],
72 cflags: [
73 "-DUSE_ARC",
74 ],
75 },
76 },
Jeff Sharkey871a8f22017-02-21 18:30:28 -070077}
Jeff Sharkeye12d5962017-04-03 16:41:02 -060078
79cc_test {
80 name: "installd_service_test",
Andreas Gampec23dc122018-03-07 10:26:50 -080081 test_suites: ["device-tests"],
Jeff Sharkeye12d5962017-04-03 16:41:02 -060082 clang: true,
83 srcs: ["installd_service_test.cpp"],
Shikha Malhotraaae96442021-11-25 10:52:50 +000084 cflags: [
85 "-Wall",
86 "-Werror",
87 ],
Jeff Sharkeye12d5962017-04-03 16:41:02 -060088 shared_libs: [
89 "libbase",
90 "libbinder",
Alan Stokesa25d90c2017-10-16 10:56:00 +010091 "libcrypto",
Jeff Sharkeye12d5962017-04-03 16:41:02 -060092 "libcutils",
Suren Baghdasaryan1cc5de62019-01-25 05:29:23 +000093 "libprocessgroup",
Jeff Sharkeye12d5962017-04-03 16:41:02 -060094 "libselinux",
95 "libutils",
Shikha Malhotraaae96442021-11-25 10:52:50 +000096 "packagemanager_aidl-cpp",
Nicolas Geoffrayaaad21e2019-02-25 13:31:10 +000097 "server_configurable_flags",
Jeff Sharkeye12d5962017-04-03 16:41:02 -060098 ],
99 static_libs: [
Martijn Coenen6de402a2021-04-26 16:23:40 +0200100 "libasync_safe",
Jeff Sharkeye12d5962017-04-03 16:41:02 -0600101 "libdiskusage",
Arthur Eubankse1d9b282017-08-16 17:12:33 -0700102 "libinstalld",
Yang Tianping8f2a40e2021-10-29 14:39:02 +0800103 "libziparchive",
Arthur Eubankse1d9b282017-08-16 17:12:33 -0700104 "liblog",
105 "liblogwrap",
Jeff Sharkeye12d5962017-04-03 16:41:02 -0600106 ],
Andreas Gampe75d394e2019-03-25 11:37:15 -0700107 test_config: "installd_service_test.xml",
Boleyn Su6ae7c462020-10-20 18:40:40 +0900108
109 product_variables: {
110 arc: {
111 exclude_srcs: [
112 "QuotaUtils.cpp",
113 ],
114 static_libs: [
115 "libarcdiskquota",
116 "arc_services_aidl",
117 ],
118 cflags: [
119 "-DUSE_ARC",
120 ],
121 },
122 },
Jeff Sharkeye12d5962017-04-03 16:41:02 -0600123}
Calin Juravle7d765462017-09-04 15:57:10 -0700124
125cc_test {
126 name: "installd_dexopt_test",
Andreas Gampec23dc122018-03-07 10:26:50 -0800127 test_suites: ["device-tests"],
Calin Juravle7d765462017-09-04 15:57:10 -0700128 clang: true,
129 srcs: ["installd_dexopt_test.cpp"],
Shikha Malhotraaae96442021-11-25 10:52:50 +0000130 cflags: [
131 "-Wall",
132 "-Werror",
133 ],
Calin Juravle7d765462017-09-04 15:57:10 -0700134 shared_libs: [
135 "libbase",
136 "libbinder",
Alan Stokesa25d90c2017-10-16 10:56:00 +0100137 "libcrypto",
Calin Juravle7d765462017-09-04 15:57:10 -0700138 "libcutils",
Suren Baghdasaryan1cc5de62019-01-25 05:29:23 +0000139 "libprocessgroup",
Calin Juravle7d765462017-09-04 15:57:10 -0700140 "libselinux",
141 "libutils",
Nicolas Geoffrayaaad21e2019-02-25 13:31:10 +0000142 "server_configurable_flags",
Calin Juravle7d765462017-09-04 15:57:10 -0700143 ],
144 static_libs: [
Martijn Coenen6de402a2021-04-26 16:23:40 +0200145 "libasync_safe",
Calin Juravle7d765462017-09-04 15:57:10 -0700146 "libdiskusage",
147 "libinstalld",
148 "liblog",
149 "liblogwrap",
liulvping61907742018-08-21 09:36:52 +0800150 "libziparchive",
151 "libz",
Calin Juravle7d765462017-09-04 15:57:10 -0700152 ],
Andreas Gampe75d394e2019-03-25 11:37:15 -0700153 test_config: "installd_dexopt_test.xml",
Boleyn Su6ae7c462020-10-20 18:40:40 +0900154
155 product_variables: {
156 arc: {
157 exclude_srcs: [
158 "QuotaUtils.cpp",
159 ],
160 static_libs: [
161 "libarcdiskquota",
162 "arc_services_aidl",
163 ],
164 cflags: [
165 "-DUSE_ARC",
166 ],
167 },
168 },
Calin Juravle7d765462017-09-04 15:57:10 -0700169}
Calin Juravledff47292018-02-01 14:44:56 +0000170
171cc_test {
172 name: "installd_otapreopt_test",
Andreas Gampec23dc122018-03-07 10:26:50 -0800173 test_suites: ["device-tests"],
Calin Juravledff47292018-02-01 14:44:56 +0000174 clang: true,
175 srcs: ["installd_otapreopt_test.cpp"],
Shikha Malhotraaae96442021-11-25 10:52:50 +0000176 cflags: [
177 "-Wall",
178 "-Werror",
179 ],
Calin Juravledff47292018-02-01 14:44:56 +0000180 shared_libs: [
181 "libbase",
182 "libcutils",
183 "libutils",
Nicolas Geoffrayaaad21e2019-02-25 13:31:10 +0000184 "server_configurable_flags",
Calin Juravledff47292018-02-01 14:44:56 +0000185 ],
186 static_libs: [
187 "liblog",
Shikha Malhotraaae96442021-11-25 10:52:50 +0000188 "libotapreoptparameters",
Calin Juravledff47292018-02-01 14:44:56 +0000189 ],
190}
Keun young Parkb7342262021-10-25 08:09:27 -0700191
192cc_test {
193 name: "installd_file_test",
194 test_suites: ["device-tests"],
195 clang: true,
196 srcs: ["installd_file_test.cpp"],
197 cflags: [
198 "-Wall",
199 "-Werror",
200 ],
201 shared_libs: [
202 "libbase",
203 "libcutils",
204 "libutils",
205 ],
206 static_libs: [
207 "libinstalld",
208 "liblog",
209 ],
210}