blob: 70820172b7f14c57e7037110b9b985b8b1d5fa61 [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",
51 "liblog",
52 "liblogwrap",
Jeff Sharkey871a8f22017-02-21 18:30:28 -070053 ],
Andreas Gampe75d394e2019-03-25 11:37:15 -070054 test_config: "installd_cache_test.xml",
Boleyn Su6ae7c462020-10-20 18:40:40 +090055
56 product_variables: {
57 arc: {
58 exclude_srcs: [
59 "QuotaUtils.cpp",
60 ],
61 static_libs: [
62 "libarcdiskquota",
63 "arc_services_aidl",
64 ],
65 cflags: [
66 "-DUSE_ARC",
67 ],
68 },
69 },
Jeff Sharkey871a8f22017-02-21 18:30:28 -070070}
Jeff Sharkeye12d5962017-04-03 16:41:02 -060071
72cc_test {
73 name: "installd_service_test",
Andreas Gampec23dc122018-03-07 10:26:50 -080074 test_suites: ["device-tests"],
Jeff Sharkeye12d5962017-04-03 16:41:02 -060075 clang: true,
76 srcs: ["installd_service_test.cpp"],
Chih-Hung Hsieh734e3782017-10-05 13:44:13 -070077 cflags: ["-Wall", "-Werror"],
Jeff Sharkeye12d5962017-04-03 16:41:02 -060078 shared_libs: [
79 "libbase",
80 "libbinder",
Alan Stokesa25d90c2017-10-16 10:56:00 +010081 "libcrypto",
Jeff Sharkeye12d5962017-04-03 16:41:02 -060082 "libcutils",
Suren Baghdasaryan1cc5de62019-01-25 05:29:23 +000083 "libprocessgroup",
Jeff Sharkeye12d5962017-04-03 16:41:02 -060084 "libselinux",
85 "libutils",
Nicolas Geoffrayaaad21e2019-02-25 13:31:10 +000086 "server_configurable_flags",
Jeff Sharkeye12d5962017-04-03 16:41:02 -060087 ],
88 static_libs: [
Martijn Coenen6de402a2021-04-26 16:23:40 +020089 "libasync_safe",
Jeff Sharkeye12d5962017-04-03 16:41:02 -060090 "libdiskusage",
Arthur Eubankse1d9b282017-08-16 17:12:33 -070091 "libinstalld",
92 "liblog",
93 "liblogwrap",
Jeff Sharkeye12d5962017-04-03 16:41:02 -060094 ],
Andreas Gampe75d394e2019-03-25 11:37:15 -070095 test_config: "installd_service_test.xml",
Boleyn Su6ae7c462020-10-20 18:40:40 +090096
97 product_variables: {
98 arc: {
99 exclude_srcs: [
100 "QuotaUtils.cpp",
101 ],
102 static_libs: [
103 "libarcdiskquota",
104 "arc_services_aidl",
105 ],
106 cflags: [
107 "-DUSE_ARC",
108 ],
109 },
110 },
Jeff Sharkeye12d5962017-04-03 16:41:02 -0600111}
Calin Juravle7d765462017-09-04 15:57:10 -0700112
113cc_test {
114 name: "installd_dexopt_test",
Andreas Gampec23dc122018-03-07 10:26:50 -0800115 test_suites: ["device-tests"],
Calin Juravle7d765462017-09-04 15:57:10 -0700116 clang: true,
117 srcs: ["installd_dexopt_test.cpp"],
118 cflags: ["-Wall", "-Werror"],
119 shared_libs: [
120 "libbase",
121 "libbinder",
Alan Stokesa25d90c2017-10-16 10:56:00 +0100122 "libcrypto",
Calin Juravle7d765462017-09-04 15:57:10 -0700123 "libcutils",
Suren Baghdasaryan1cc5de62019-01-25 05:29:23 +0000124 "libprocessgroup",
Calin Juravle7d765462017-09-04 15:57:10 -0700125 "libselinux",
126 "libutils",
Nicolas Geoffrayaaad21e2019-02-25 13:31:10 +0000127 "server_configurable_flags",
Calin Juravle7d765462017-09-04 15:57:10 -0700128 ],
129 static_libs: [
Martijn Coenen6de402a2021-04-26 16:23:40 +0200130 "libasync_safe",
Calin Juravle7d765462017-09-04 15:57:10 -0700131 "libdiskusage",
132 "libinstalld",
133 "liblog",
134 "liblogwrap",
liulvping61907742018-08-21 09:36:52 +0800135 "libziparchive",
136 "libz",
Calin Juravle7d765462017-09-04 15:57:10 -0700137 ],
Andreas Gampe75d394e2019-03-25 11:37:15 -0700138 test_config: "installd_dexopt_test.xml",
Boleyn Su6ae7c462020-10-20 18:40:40 +0900139
140 product_variables: {
141 arc: {
142 exclude_srcs: [
143 "QuotaUtils.cpp",
144 ],
145 static_libs: [
146 "libarcdiskquota",
147 "arc_services_aidl",
148 ],
149 cflags: [
150 "-DUSE_ARC",
151 ],
152 },
153 },
Calin Juravle7d765462017-09-04 15:57:10 -0700154}
Calin Juravledff47292018-02-01 14:44:56 +0000155
156cc_test {
157 name: "installd_otapreopt_test",
Andreas Gampec23dc122018-03-07 10:26:50 -0800158 test_suites: ["device-tests"],
Calin Juravledff47292018-02-01 14:44:56 +0000159 clang: true,
160 srcs: ["installd_otapreopt_test.cpp"],
161 cflags: ["-Wall", "-Werror"],
162 shared_libs: [
163 "libbase",
164 "libcutils",
165 "libutils",
Nicolas Geoffrayaaad21e2019-02-25 13:31:10 +0000166 "server_configurable_flags",
Calin Juravledff47292018-02-01 14:44:56 +0000167 ],
168 static_libs: [
169 "liblog",
170 "libotapreoptparameters"
171 ],
172}