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_test { 81 name: "installd_service_test", 82 test_suites: ["device-tests"], 83 srcs: ["installd_service_test.cpp"], 84 cflags: [ 85 "-Wall", 86 "-Werror", 87 ], 88 shared_libs: [ 89 "libbase", 90 "libbinder", 91 "libcrypto", 92 "libcutils", 93 "libprocessgroup", 94 "libselinux", 95 "libutils", 96 "packagemanager_aidl-cpp", 97 "server_configurable_flags", 98 ], 99 static_libs: [ 100 "libasync_safe", 101 "libdiskusage", 102 "libext2_uuid", 103 "libinstalld", 104 "libziparchive", 105 "liblog", 106 "liblogwrap", 107 "libc++fs", 108 ], 109 test_config: "installd_service_test.xml", 110 111 product_variables: { 112 arc: { 113 exclude_srcs: [ 114 "QuotaUtils.cpp", 115 ], 116 static_libs: [ 117 "libarcdiskquota", 118 "arc_services_aidl", 119 ], 120 cflags: [ 121 "-DUSE_ARC", 122 ], 123 }, 124 }, 125} 126 127cc_test { 128 name: "installd_dexopt_test", 129 test_suites: ["device-tests"], 130 srcs: ["installd_dexopt_test.cpp"], 131 cflags: [ 132 "-Wall", 133 "-Werror", 134 ], 135 shared_libs: [ 136 "libbase", 137 "libbinder", 138 "libcrypto", 139 "libcutils", 140 "libprocessgroup", 141 "libselinux", 142 "libutils", 143 "server_configurable_flags", 144 ], 145 static_libs: [ 146 "libasync_safe", 147 "libdiskusage", 148 "libext2_uuid", 149 "libinstalld", 150 "liblog", 151 "liblogwrap", 152 "libziparchive", 153 "libz", 154 ], 155 test_config: "installd_dexopt_test.xml", 156 157 product_variables: { 158 arc: { 159 exclude_srcs: [ 160 "QuotaUtils.cpp", 161 ], 162 static_libs: [ 163 "libarcdiskquota", 164 "arc_services_aidl", 165 ], 166 cflags: [ 167 "-DUSE_ARC", 168 ], 169 }, 170 }, 171} 172 173cc_test { 174 name: "installd_otapreopt_test", 175 test_suites: ["device-tests"], 176 srcs: ["installd_otapreopt_test.cpp"], 177 cflags: [ 178 "-Wall", 179 "-Werror", 180 ], 181 shared_libs: [ 182 "libbase", 183 "libcutils", 184 "libutils", 185 "server_configurable_flags", 186 ], 187 static_libs: [ 188 "liblog", 189 "libotapreoptparameters", 190 ], 191} 192 193cc_test { 194 name: "installd_file_test", 195 test_suites: ["device-tests"], 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 "libext2_uuid", 208 "libinstalld", 209 "liblog", 210 ], 211} 212