1// Build the unit tests for installd 2package { 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 11cc_test { 12 name: "installd_utils_test", 13 test_suites: ["device-tests"], 14 srcs: ["installd_utils_test.cpp"], 15 cflags: [ 16 "-Wall", 17 "-Werror", 18 ], 19 shared_libs: [ 20 "libbase", 21 "libutils", 22 "libcutils", 23 ], 24 static_libs: [ 25 "libasync_safe", 26 "libdiskusage", 27 "libext2_uuid", 28 "libgmock", 29 "libinstalld", 30 "liblog", 31 ], 32 test_config: "installd_utils_test.xml", 33} 34 35cc_test { 36 name: "installd_cache_test", 37 test_suites: ["device-tests"], 38 srcs: ["installd_cache_test.cpp"], 39 cflags: [ 40 "-Wall", 41 "-Werror", 42 ], 43 shared_libs: [ 44 "libbase", 45 "libbinder", 46 "libcrypto", 47 "libcutils", 48 "libprocessgroup", 49 "libselinux", 50 "libutils", 51 "server_configurable_flags", 52 ], 53 static_libs: [ 54 "libasync_safe", 55 "libdiskusage", 56 "libext2_uuid", 57 "libinstalld", 58 "libziparchive", 59 "liblog", 60 "liblogwrap", 61 ], 62 test_config: "installd_cache_test.xml", 63 64 product_variables: { 65 arc: { 66 exclude_srcs: [ 67 "QuotaUtils.cpp", 68 ], 69 static_libs: [ 70 "libarcdiskquota", 71 "arc_services_aidl", 72 ], 73 cflags: [ 74 "-DUSE_ARC", 75 ], 76 }, 77 }, 78} 79 80cc_defaults { 81 name: "installd_service_test_defaults", 82 cflags: [ 83 "-Wall", 84 "-Werror", 85 ], 86 shared_libs: [ 87 "libbase", 88 "libbinder", 89 "libcrypto", 90 "libcutils", 91 "libprocessgroup", 92 "libselinux", 93 "libutils", 94 "packagemanager_aidl-cpp", 95 "server_configurable_flags", 96 ], 97 static_libs: [ 98 "libasync_safe", 99 "libdiskusage", 100 "libext2_uuid", 101 "libinstalld", 102 "libziparchive", 103 "liblog", 104 "liblogwrap", 105 ], 106 product_variables: { 107 arc: { 108 exclude_srcs: [ 109 "QuotaUtils.cpp", 110 ], 111 static_libs: [ 112 "libarcdiskquota", 113 "arc_services_aidl", 114 ], 115 cflags: [ 116 "-DUSE_ARC", 117 ], 118 }, 119 }, 120} 121 122cc_test { 123 name: "installd_service_test", 124 test_suites: ["device-tests"], 125 srcs: ["installd_service_test.cpp"], 126 defaults: ["installd_service_test_defaults"], 127 test_config: "installd_service_test.xml", 128} 129 130cc_test { 131 name: "installd_dexopt_test", 132 test_suites: ["device-tests"], 133 srcs: ["installd_dexopt_test.cpp"], 134 cflags: [ 135 "-Wall", 136 "-Werror", 137 ], 138 shared_libs: [ 139 "libbase", 140 "libbinder", 141 "libcrypto", 142 "libcutils", 143 "libprocessgroup", 144 "libselinux", 145 "libutils", 146 "server_configurable_flags", 147 ], 148 static_libs: [ 149 "libasync_safe", 150 "libdiskusage", 151 "libext2_uuid", 152 "libinstalld", 153 "liblog", 154 "liblogwrap", 155 "libziparchive", 156 "libz", 157 ], 158 test_config: "installd_dexopt_test.xml", 159 160 product_variables: { 161 arc: { 162 exclude_srcs: [ 163 "QuotaUtils.cpp", 164 ], 165 static_libs: [ 166 "libarcdiskquota", 167 "arc_services_aidl", 168 ], 169 cflags: [ 170 "-DUSE_ARC", 171 ], 172 }, 173 }, 174} 175 176cc_test { 177 name: "installd_otapreopt_test", 178 test_suites: ["device-tests"], 179 srcs: ["installd_otapreopt_test.cpp"], 180 cflags: [ 181 "-Wall", 182 "-Werror", 183 ], 184 shared_libs: [ 185 "libbase", 186 "libcutils", 187 "libutils", 188 "server_configurable_flags", 189 ], 190 static_libs: [ 191 "liblog", 192 "libotapreoptparameters", 193 ], 194} 195 196cc_test { 197 name: "installd_file_test", 198 test_suites: ["device-tests"], 199 srcs: ["installd_file_test.cpp"], 200 cflags: [ 201 "-Wall", 202 "-Werror", 203 ], 204 shared_libs: [ 205 "libbase", 206 "libcutils", 207 "libutils", 208 ], 209 static_libs: [ 210 "libext2_uuid", 211 "libinstalld", 212 "liblog", 213 ], 214} 215 216cc_fuzz { 217 name: "installd_service_fuzzer", 218 defaults: [ 219 "service_fuzzer_defaults", 220 "fuzzer_disable_leaks", 221 "installd_service_test_defaults", 222 ], 223 srcs: ["fuzzers/InstalldServiceFuzzer.cpp"], 224 fuzz_config: { 225 cc: [ 226 "[email protected]", 227 ], 228 triage_assignee: "[email protected]", 229 }, 230} 231