blob: 13e15cab5bfbafd84a6af445487a6cb5ec5ac832 [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"],
Chih-Hung Hsieh734e3782017-10-05 13:44:13 -070016 cflags: ["-Wall", "-Werror"],
Dan Willemsen4c939742016-12-06 15:44:57 -080017 shared_libs: [
18 "libbase",
Dan Willemsen4c939742016-12-06 15:44:57 -080019 "libutils",
20 "libcutils",
21 ],
22 static_libs: [
Martijn Coenen6de402a2021-04-26 16:23:40 +020023 "libasync_safe",
Dan Willemsen4c939742016-12-06 15:44:57 -080024 "libdiskusage",
Arthur Eubankse1d9b282017-08-16 17:12:33 -070025 "libinstalld",
26 "liblog",
Dan Willemsen4c939742016-12-06 15:44:57 -080027 ],
Andreas Gampe75d394e2019-03-25 11:37:15 -070028 test_config: "installd_utils_test.xml",
Dan Willemsen4c939742016-12-06 15:44:57 -080029}
Jeff Sharkey871a8f22017-02-21 18:30:28 -070030
31cc_test {
32 name: "installd_cache_test",
Andreas Gampec23dc122018-03-07 10:26:50 -080033 test_suites: ["device-tests"],
Jeff Sharkey871a8f22017-02-21 18:30:28 -070034 clang: true,
35 srcs: ["installd_cache_test.cpp"],
Chih-Hung Hsieh734e3782017-10-05 13:44:13 -070036 cflags: ["-Wall", "-Werror"],
Jeff Sharkey871a8f22017-02-21 18:30:28 -070037 shared_libs: [
38 "libbase",
39 "libbinder",
Alan Stokesa25d90c2017-10-16 10:56:00 +010040 "libcrypto",
Jeff Sharkey871a8f22017-02-21 18:30:28 -070041 "libcutils",
Suren Baghdasaryan1cc5de62019-01-25 05:29:23 +000042 "libprocessgroup",
Jeff Sharkey871a8f22017-02-21 18:30:28 -070043 "libselinux",
44 "libutils",
Nicolas Geoffrayaaad21e2019-02-25 13:31:10 +000045 "server_configurable_flags",
Jeff Sharkey871a8f22017-02-21 18:30:28 -070046 ],
47 static_libs: [
Martijn Coenen6de402a2021-04-26 16:23:40 +020048 "libasync_safe",
Jeff Sharkey871a8f22017-02-21 18:30:28 -070049 "libdiskusage",
Arthur Eubankse1d9b282017-08-16 17:12:33 -070050 "libinstalld",
Yang Tianping8f2a40e2021-10-29 14:39:02 +080051 "libziparchive",
Arthur Eubankse1d9b282017-08-16 17:12:33 -070052 "liblog",
53 "liblogwrap",
Jeff Sharkey871a8f22017-02-21 18:30:28 -070054 ],
Andreas Gampe75d394e2019-03-25 11:37:15 -070055 test_config: "installd_cache_test.xml",
Boleyn Su6ae7c462020-10-20 18:40:40 +090056
57 product_variables: {
58 arc: {
59 exclude_srcs: [
60 "QuotaUtils.cpp",
61 ],
62 static_libs: [
63 "libarcdiskquota",
64 "arc_services_aidl",
65 ],
66 cflags: [
67 "-DUSE_ARC",
68 ],
69 },
70 },
Jeff Sharkey871a8f22017-02-21 18:30:28 -070071}
Jeff Sharkeye12d5962017-04-03 16:41:02 -060072
73cc_test {
74 name: "installd_service_test",
Andreas Gampec23dc122018-03-07 10:26:50 -080075 test_suites: ["device-tests"],
Jeff Sharkeye12d5962017-04-03 16:41:02 -060076 clang: true,
77 srcs: ["installd_service_test.cpp"],
Chih-Hung Hsieh734e3782017-10-05 13:44:13 -070078 cflags: ["-Wall", "-Werror"],
Jeff Sharkeye12d5962017-04-03 16:41:02 -060079 shared_libs: [
80 "libbase",
81 "libbinder",
Alan Stokesa25d90c2017-10-16 10:56:00 +010082 "libcrypto",
Jeff Sharkeye12d5962017-04-03 16:41:02 -060083 "libcutils",
Suren Baghdasaryan1cc5de62019-01-25 05:29:23 +000084 "libprocessgroup",
Jeff Sharkeye12d5962017-04-03 16:41:02 -060085 "libselinux",
86 "libutils",
Nicolas Geoffrayaaad21e2019-02-25 13:31:10 +000087 "server_configurable_flags",
Jeff Sharkeye12d5962017-04-03 16:41:02 -060088 ],
89 static_libs: [
Martijn Coenen6de402a2021-04-26 16:23:40 +020090 "libasync_safe",
Jeff Sharkeye12d5962017-04-03 16:41:02 -060091 "libdiskusage",
Arthur Eubankse1d9b282017-08-16 17:12:33 -070092 "libinstalld",
Yang Tianping8f2a40e2021-10-29 14:39:02 +080093 "libziparchive",
Arthur Eubankse1d9b282017-08-16 17:12:33 -070094 "liblog",
95 "liblogwrap",
Jeff Sharkeye12d5962017-04-03 16:41:02 -060096 ],
Andreas Gampe75d394e2019-03-25 11:37:15 -070097 test_config: "installd_service_test.xml",
Boleyn Su6ae7c462020-10-20 18:40:40 +090098
99 product_variables: {
100 arc: {
101 exclude_srcs: [
102 "QuotaUtils.cpp",
103 ],
104 static_libs: [
105 "libarcdiskquota",
106 "arc_services_aidl",
107 ],
108 cflags: [
109 "-DUSE_ARC",
110 ],
111 },
112 },
Jeff Sharkeye12d5962017-04-03 16:41:02 -0600113}
Calin Juravle7d765462017-09-04 15:57:10 -0700114
115cc_test {
116 name: "installd_dexopt_test",
Andreas Gampec23dc122018-03-07 10:26:50 -0800117 test_suites: ["device-tests"],
Calin Juravle7d765462017-09-04 15:57:10 -0700118 clang: true,
119 srcs: ["installd_dexopt_test.cpp"],
120 cflags: ["-Wall", "-Werror"],
121 shared_libs: [
122 "libbase",
123 "libbinder",
Alan Stokesa25d90c2017-10-16 10:56:00 +0100124 "libcrypto",
Calin Juravle7d765462017-09-04 15:57:10 -0700125 "libcutils",
Suren Baghdasaryan1cc5de62019-01-25 05:29:23 +0000126 "libprocessgroup",
Calin Juravle7d765462017-09-04 15:57:10 -0700127 "libselinux",
128 "libutils",
Nicolas Geoffrayaaad21e2019-02-25 13:31:10 +0000129 "server_configurable_flags",
Calin Juravle7d765462017-09-04 15:57:10 -0700130 ],
131 static_libs: [
Martijn Coenen6de402a2021-04-26 16:23:40 +0200132 "libasync_safe",
Calin Juravle7d765462017-09-04 15:57:10 -0700133 "libdiskusage",
134 "libinstalld",
135 "liblog",
136 "liblogwrap",
liulvping61907742018-08-21 09:36:52 +0800137 "libziparchive",
138 "libz",
Calin Juravle7d765462017-09-04 15:57:10 -0700139 ],
Andreas Gampe75d394e2019-03-25 11:37:15 -0700140 test_config: "installd_dexopt_test.xml",
Boleyn Su6ae7c462020-10-20 18:40:40 +0900141
142 product_variables: {
143 arc: {
144 exclude_srcs: [
145 "QuotaUtils.cpp",
146 ],
147 static_libs: [
148 "libarcdiskquota",
149 "arc_services_aidl",
150 ],
151 cflags: [
152 "-DUSE_ARC",
153 ],
154 },
155 },
Calin Juravle7d765462017-09-04 15:57:10 -0700156}
Calin Juravledff47292018-02-01 14:44:56 +0000157
158cc_test {
159 name: "installd_otapreopt_test",
Andreas Gampec23dc122018-03-07 10:26:50 -0800160 test_suites: ["device-tests"],
Calin Juravledff47292018-02-01 14:44:56 +0000161 clang: true,
162 srcs: ["installd_otapreopt_test.cpp"],
163 cflags: ["-Wall", "-Werror"],
164 shared_libs: [
165 "libbase",
166 "libcutils",
167 "libutils",
Nicolas Geoffrayaaad21e2019-02-25 13:31:10 +0000168 "server_configurable_flags",
Calin Juravledff47292018-02-01 14:44:56 +0000169 ],
170 static_libs: [
171 "liblog",
172 "libotapreoptparameters"
173 ],
174}