Dan Albert | 13f21c2 | 2014-10-16 17:39:31 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2014 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
Kenny Root | 7a4adb5 | 2013-10-09 10:14:35 -0700 | [diff] [blame] | 17 | LOCAL_PATH := $(call my-dir) |
Dan Albert | 13f21c2 | 2014-10-16 17:39:31 -0700 | [diff] [blame] | 18 | |
Tao Bao | b8cb2e6 | 2018-07-06 12:14:36 -0700 | [diff] [blame] | 19 | # libapplypatch, libapplypatch_modes, libimgdiff, libimgpatch. |
| 20 | libapplypatch_static_libraries := \ |
| 21 | libapplypatch_modes \ |
| 22 | libapplypatch \ |
| 23 | libedify \ |
| 24 | libimgdiff \ |
| 25 | libimgpatch \ |
| 26 | libotafault \ |
| 27 | libotautil \ |
| 28 | libbsdiff \ |
| 29 | libbspatch \ |
| 30 | libdivsufsort \ |
| 31 | libdivsufsort64 \ |
| 32 | libutils \ |
| 33 | libbase \ |
| 34 | libbrotli \ |
| 35 | libbz \ |
| 36 | libcrypto \ |
| 37 | libz \ |
| 38 | libziparchive \ |
| 39 | |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 40 | # Unit tests |
| 41 | include $(CLEAR_VARS) |
Tianjie Xu | c89d1e7 | 2017-08-28 14:15:07 -0700 | [diff] [blame] | 42 | LOCAL_CFLAGS := -Wall -Werror |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 43 | LOCAL_MODULE := recovery_unit_test |
Dan Shi | 7368316 | 2017-03-28 17:22:41 -0700 | [diff] [blame] | 44 | LOCAL_COMPATIBILITY_SUITE := device-tests |
Tianjie Xu | 2430e29 | 2016-04-19 15:02:41 -0700 | [diff] [blame] | 45 | LOCAL_STATIC_LIBRARIES := \ |
Tao Bao | b8cb2e6 | 2018-07-06 12:14:36 -0700 | [diff] [blame] | 46 | $(libapplypatch_static_libraries) \ |
Tianjie Xu | 2430e29 | 2016-04-19 15:02:41 -0700 | [diff] [blame] | 47 | libverifier \ |
Tianjie Xu | 5fe5eb6 | 2018-03-20 16:07:39 -0700 | [diff] [blame] | 48 | librecovery_ui \ |
Tianjie Xu | 8cf5c8f | 2016-09-08 20:10:11 -0700 | [diff] [blame] | 49 | libminui \ |
| 50 | libotautil \ |
Tao Bao | 8f23757 | 2017-03-26 13:36:49 -0700 | [diff] [blame] | 51 | libupdater \ |
Tao Bao | 6a7e4af | 2018-06-14 21:57:43 -0700 | [diff] [blame] | 52 | libgtest_prod \ |
Tao Bao | 6cd8168 | 2018-05-03 21:53:11 -0700 | [diff] [blame] | 53 | libpng \ |
Tianjie Xu | 8cf5c8f | 2016-09-08 20:10:11 -0700 | [diff] [blame] | 54 | libziparchive \ |
| 55 | libutils \ |
| 56 | libz \ |
| 57 | libselinux \ |
Tianjie Xu | a88cc54 | 2017-10-25 13:16:54 -0700 | [diff] [blame] | 58 | libbase \ |
| 59 | libBionicGtestMain |
Tianjie Xu | 2430e29 | 2016-04-19 15:02:41 -0700 | [diff] [blame] | 60 | |
Tao Bao | c3292f3 | 2016-11-04 10:52:13 -0700 | [diff] [blame] | 61 | LOCAL_SRC_FILES := \ |
Tao Bao | b8cb2e6 | 2018-07-06 12:14:36 -0700 | [diff] [blame] | 62 | unit/applypatch_test.cpp \ |
Tao Bao | c3292f3 | 2016-11-04 10:52:13 -0700 | [diff] [blame] | 63 | unit/asn1_decoder_test.cpp \ |
Tao Bao | c390123 | 2018-05-21 16:05:56 -0700 | [diff] [blame] | 64 | unit/commands_test.cpp \ |
Tao Bao | f19295c | 2016-12-22 09:28:03 -0800 | [diff] [blame] | 65 | unit/dirutil_test.cpp \ |
Tao Bao | c3292f3 | 2016-11-04 10:52:13 -0700 | [diff] [blame] | 66 | unit/locale_test.cpp \ |
Tao Bao | 8f23757 | 2017-03-26 13:36:49 -0700 | [diff] [blame] | 67 | unit/rangeset_test.cpp \ |
Tianjie Xu | 5fe5eb6 | 2018-03-20 16:07:39 -0700 | [diff] [blame] | 68 | unit/screen_ui_test.cpp \ |
Tao Bao | c3292f3 | 2016-11-04 10:52:13 -0700 | [diff] [blame] | 69 | unit/sysutil_test.cpp \ |
Tianjie Xu | 5fe5eb6 | 2018-03-20 16:07:39 -0700 | [diff] [blame] | 70 | unit/zip_test.cpp |
Tao Bao | c3292f3 | 2016-11-04 10:52:13 -0700 | [diff] [blame] | 71 | |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 72 | LOCAL_C_INCLUDES := bootable/recovery |
Mark Salyzyn | a4f701a | 2016-03-09 14:58:16 -0800 | [diff] [blame] | 73 | LOCAL_SHARED_LIBRARIES := liblog |
Tao Bao | 9d91e89 | 2018-03-30 20:43:45 -0700 | [diff] [blame] | 74 | LOCAL_TEST_DATA := \ |
| 75 | $(call find-test-data-in-subdirs, $(LOCAL_PATH), "*", testdata) |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 76 | include $(BUILD_NATIVE_TEST) |
| 77 | |
Tianjie Xu | 5d8b53b | 2016-11-07 14:45:59 -0800 | [diff] [blame] | 78 | # Manual tests |
| 79 | include $(CLEAR_VARS) |
Tianjie Xu | c89d1e7 | 2017-08-28 14:15:07 -0700 | [diff] [blame] | 80 | LOCAL_CFLAGS := -Wall -Werror |
Tianjie Xu | 5d8b53b | 2016-11-07 14:45:59 -0800 | [diff] [blame] | 81 | LOCAL_MODULE := recovery_manual_test |
Tianjie Xu | d17a688 | 2017-01-09 11:18:29 -0800 | [diff] [blame] | 82 | LOCAL_STATIC_LIBRARIES := \ |
Tianjie Xu | a88cc54 | 2017-10-25 13:16:54 -0700 | [diff] [blame] | 83 | libbase \ |
| 84 | libBionicGtestMain |
Tianjie Xu | 5d8b53b | 2016-11-07 14:45:59 -0800 | [diff] [blame] | 85 | |
| 86 | LOCAL_SRC_FILES := manual/recovery_test.cpp |
Tianjie Xu | d17a688 | 2017-01-09 11:18:29 -0800 | [diff] [blame] | 87 | LOCAL_SHARED_LIBRARIES := \ |
Tao Bao | 6b28f05 | 2018-04-13 13:41:58 -0700 | [diff] [blame] | 88 | liblog |
Tianjie Xu | d17a688 | 2017-01-09 11:18:29 -0800 | [diff] [blame] | 89 | |
Tianjie Xu | 5d8b53b | 2016-11-07 14:45:59 -0800 | [diff] [blame] | 90 | include $(BUILD_NATIVE_TEST) |
| 91 | |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 92 | # Component tests |
Kenny Root | 7a4adb5 | 2013-10-09 10:14:35 -0700 | [diff] [blame] | 93 | include $(CLEAR_VARS) |
Tianjie Xu | 56ebe62 | 2017-03-16 00:48:21 -0700 | [diff] [blame] | 94 | LOCAL_CFLAGS := \ |
Tianjie Xu | c89d1e7 | 2017-08-28 14:15:07 -0700 | [diff] [blame] | 95 | -Wall \ |
Tianjie Xu | 56ebe62 | 2017-03-16 00:48:21 -0700 | [diff] [blame] | 96 | -Werror \ |
| 97 | -D_FILE_OFFSET_BITS=64 |
| 98 | |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 99 | LOCAL_MODULE := recovery_component_test |
Dan Shi | 7368316 | 2017-03-28 17:22:41 -0700 | [diff] [blame] | 100 | LOCAL_COMPATIBILITY_SUITE := device-tests |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 101 | LOCAL_C_INCLUDES := bootable/recovery |
Jed Estep | b8a693b | 2016-03-09 17:51:34 -0800 | [diff] [blame] | 102 | LOCAL_SRC_FILES := \ |
Tao Bao | b8cb2e6 | 2018-07-06 12:14:36 -0700 | [diff] [blame] | 103 | component/applypatch_modes_test.cpp \ |
Tao Bao | 8b7301b | 2016-12-14 15:52:34 -0800 | [diff] [blame] | 104 | component/bootloader_message_test.cpp \ |
Tao Bao | d770d2e | 2016-10-03 15:26:06 -0700 | [diff] [blame] | 105 | component/edify_test.cpp \ |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 106 | component/imgdiff_test.cpp \ |
Tao Bao | 1d86605 | 2017-04-10 16:55:57 -0700 | [diff] [blame] | 107 | component/install_test.cpp \ |
Tao Bao | 6b28f05 | 2018-04-13 13:41:58 -0700 | [diff] [blame] | 108 | component/resources_test.cpp \ |
Wei Wang | b72a15a | 2017-03-02 13:46:37 -0800 | [diff] [blame] | 109 | component/sideload_test.cpp \ |
Tao Bao | 1033408 | 2016-12-12 17:10:20 -0800 | [diff] [blame] | 110 | component/uncrypt_test.cpp \ |
Tao Bao | 0c7839a | 2016-10-10 15:48:37 -0700 | [diff] [blame] | 111 | component/updater_test.cpp \ |
Tao Bao | 83b0780 | 2017-04-26 14:30:56 -0700 | [diff] [blame] | 112 | component/update_verifier_test.cpp \ |
Tao Bao | 0c7839a | 2016-10-10 15:48:37 -0700 | [diff] [blame] | 113 | component/verifier_test.cpp |
Tao Bao | 1033408 | 2016-12-12 17:10:20 -0800 | [diff] [blame] | 114 | |
Tao Bao | 3e2345e | 2017-08-09 16:33:07 -0700 | [diff] [blame] | 115 | LOCAL_SHARED_LIBRARIES := \ |
Tianjie Xu | 4d9e62d | 2018-05-11 10:41:44 -0700 | [diff] [blame] | 116 | libhidlbase \ |
| 117 | libprotobuf-cpp-lite |
Tao Bao | 0c7839a | 2016-10-10 15:48:37 -0700 | [diff] [blame] | 118 | |
| 119 | tune2fs_static_libraries := \ |
| 120 | libext2_com_err \ |
| 121 | libext2_blkid \ |
| 122 | libext2_quota \ |
Alex Deymo | 7c5dbd6 | 2017-01-13 17:32:20 -0800 | [diff] [blame] | 123 | libext2_uuid \ |
Tao Bao | 0c7839a | 2016-10-10 15:48:37 -0700 | [diff] [blame] | 124 | libext2_e2p \ |
| 125 | libext2fs |
| 126 | |
Tao Bao | 9e30997 | 2018-05-11 15:13:10 -0700 | [diff] [blame] | 127 | libupdater_static_libraries := \ |
Tao Bao | 0c7839a | 2016-10-10 15:48:37 -0700 | [diff] [blame] | 128 | libupdater \ |
Tao Bao | 9e30997 | 2018-05-11 15:13:10 -0700 | [diff] [blame] | 129 | libapplypatch \ |
| 130 | libbspatch \ |
| 131 | libedify \ |
| 132 | libziparchive \ |
| 133 | libotautil \ |
Tao Bao | bedf5fc | 2016-11-18 12:01:26 -0800 | [diff] [blame] | 134 | libbootloader_message \ |
Tao Bao | 9e30997 | 2018-05-11 15:13:10 -0700 | [diff] [blame] | 135 | libutils \ |
| 136 | libotafault \ |
| 137 | libext4_utils \ |
| 138 | libfec \ |
| 139 | libfec_rs \ |
Tianjie Xu | 69ffa15 | 2018-08-01 16:40:00 -0700 | [diff] [blame] | 140 | libverity_tree \ |
Tao Bao | 9e30997 | 2018-05-11 15:13:10 -0700 | [diff] [blame] | 141 | libfs_mgr \ |
Tao Bao | 6a7e4af | 2018-06-14 21:57:43 -0700 | [diff] [blame] | 142 | libgtest_prod \ |
Tao Bao | 9e30997 | 2018-05-11 15:13:10 -0700 | [diff] [blame] | 143 | liblog \ |
| 144 | libselinux \ |
| 145 | libsparse \ |
| 146 | libsquashfs_utils \ |
| 147 | libbz \ |
| 148 | libz \ |
| 149 | libbase \ |
| 150 | libcrypto \ |
| 151 | libcrypto_utils \ |
| 152 | libcutils \ |
| 153 | libtune2fs \ |
| 154 | libbrotli \ |
| 155 | $(tune2fs_static_libraries) |
| 156 | |
Tao Bao | fd0ace8 | 2017-10-11 20:25:36 -0700 | [diff] [blame] | 157 | health_hal_static_libraries := \ |
| 158 | android.hardware.health@2.0-impl \ |
| 159 | android.hardware.health@2.0 \ |
| 160 | android.hardware.health@1.0 \ |
| 161 | android.hardware.health@1.0-convert \ |
| 162 | libhealthstoragedefault \ |
| 163 | libhidltransport \ |
| 164 | libhidlbase \ |
| 165 | libhwbinder_noltopgo \ |
| 166 | libvndksupport \ |
| 167 | libbatterymonitor |
| 168 | |
Tao Bao | 9e30997 | 2018-05-11 15:13:10 -0700 | [diff] [blame] | 169 | librecovery_static_libraries := \ |
| 170 | librecovery \ |
Tao Bao | 9e30997 | 2018-05-11 15:13:10 -0700 | [diff] [blame] | 171 | libbootloader_message \ |
| 172 | libfusesideload \ |
Tao Bao | c70446c | 2018-08-07 20:11:44 -0700 | [diff] [blame] | 173 | libminadbd \ |
Tao Bao | 42c45e2 | 2018-07-31 09:37:12 -0700 | [diff] [blame] | 174 | librecovery_ui_default \ |
Tao Bao | 9e30997 | 2018-05-11 15:13:10 -0700 | [diff] [blame] | 175 | librecovery_ui \ |
| 176 | libminui \ |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 177 | libverifier \ |
Tianjie Xu | 8cf5c8f | 2016-09-08 20:10:11 -0700 | [diff] [blame] | 178 | libotautil \ |
Tao Bao | fd0ace8 | 2017-10-11 20:25:36 -0700 | [diff] [blame] | 179 | $(health_hal_static_libraries) \ |
Tao Bao | 9e30997 | 2018-05-11 15:13:10 -0700 | [diff] [blame] | 180 | libasyncio \ |
Tao Bao | 9e30997 | 2018-05-11 15:13:10 -0700 | [diff] [blame] | 181 | libcrypto_utils \ |
| 182 | libcrypto \ |
| 183 | libext4_utils \ |
Tao Bao | bedf5fc | 2016-11-18 12:01:26 -0800 | [diff] [blame] | 184 | libfs_mgr \ |
Tao Bao | 6b28f05 | 2018-04-13 13:41:58 -0700 | [diff] [blame] | 185 | libpng \ |
Tao Bao | 9e30997 | 2018-05-11 15:13:10 -0700 | [diff] [blame] | 186 | libsparse \ |
Tao Bao | 919d2c9 | 2017-04-10 16:55:57 -0700 | [diff] [blame] | 187 | libvintf_recovery \ |
| 188 | libvintf \ |
Yifan Hong | 495c521 | 2018-03-06 17:59:58 -0800 | [diff] [blame] | 189 | libhidl-gen-utils \ |
Tao Bao | 919d2c9 | 2017-04-10 16:55:57 -0700 | [diff] [blame] | 190 | libtinyxml2 \ |
Tao Bao | ef0eb3b | 2016-11-14 21:29:52 -0800 | [diff] [blame] | 191 | libziparchive \ |
Tianjie Xu | 7b0ad9c | 2016-08-05 18:00:04 -0700 | [diff] [blame] | 192 | libbase \ |
Tao Bao | 9e30997 | 2018-05-11 15:13:10 -0700 | [diff] [blame] | 193 | libutils \ |
Tao Bao | fd0ace8 | 2017-10-11 20:25:36 -0700 | [diff] [blame] | 194 | libcutils \ |
Tao Bao | 9e30997 | 2018-05-11 15:13:10 -0700 | [diff] [blame] | 195 | liblog \ |
| 196 | libselinux \ |
| 197 | libz \ |
| 198 | |
| 199 | libupdate_verifier_static_libraries := \ |
| 200 | libupdate_verifier \ |
| 201 | |
| 202 | LOCAL_STATIC_LIBRARIES := \ |
| 203 | $(libapplypatch_static_libraries) \ |
| 204 | $(librecovery_static_libraries) \ |
| 205 | $(libupdate_verifier_static_libraries) \ |
| 206 | $(libupdater_static_libraries) \ |
| 207 | libBionicGtestMain |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 208 | |
Tao Bao | 9d91e89 | 2018-03-30 20:43:45 -0700 | [diff] [blame] | 209 | LOCAL_TEST_DATA := \ |
Tao Bao | 6b28f05 | 2018-04-13 13:41:58 -0700 | [diff] [blame] | 210 | $(call find-test-data-in-subdirs, $(LOCAL_PATH), "*", testdata) \ |
| 211 | $(call find-test-data-in-subdirs, bootable/recovery, "*_text.png", res-*) |
Dan Albert | 13f21c2 | 2014-10-16 17:39:31 -0700 | [diff] [blame] | 212 | include $(BUILD_NATIVE_TEST) |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 213 | |
| 214 | # Host tests |
| 215 | include $(CLEAR_VARS) |
Tianjie Xu | c89d1e7 | 2017-08-28 14:15:07 -0700 | [diff] [blame] | 216 | LOCAL_CFLAGS := -Wall -Werror |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 217 | LOCAL_MODULE := recovery_host_test |
| 218 | LOCAL_MODULE_HOST_OS := linux |
| 219 | LOCAL_C_INCLUDES := bootable/recovery |
| 220 | LOCAL_SRC_FILES := \ |
| 221 | component/imgdiff_test.cpp |
| 222 | LOCAL_STATIC_LIBRARIES := \ |
| 223 | libimgdiff \ |
| 224 | libimgpatch \ |
Tao Bao | 09e468f | 2017-09-29 14:39:33 -0700 | [diff] [blame] | 225 | libotautil \ |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 226 | libbsdiff \ |
Sen Jiang | 25c5697 | 2016-05-10 15:23:25 -0700 | [diff] [blame] | 227 | libbspatch \ |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 228 | libziparchive \ |
Tianjie Xu | 1ea84d6 | 2017-02-22 18:23:58 -0800 | [diff] [blame] | 229 | libutils \ |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 230 | libbase \ |
| 231 | libcrypto \ |
Tianjie Xu | 8c28081 | 2017-10-28 22:13:16 -0700 | [diff] [blame] | 232 | libbrotli \ |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 233 | libbz \ |
| 234 | libdivsufsort64 \ |
| 235 | libdivsufsort \ |
Tianjie Xu | a88cc54 | 2017-10-25 13:16:54 -0700 | [diff] [blame] | 236 | libz \ |
| 237 | libBionicGtestMain |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 238 | LOCAL_SHARED_LIBRARIES := \ |
| 239 | liblog |
Tao Bao | 9d91e89 | 2018-03-30 20:43:45 -0700 | [diff] [blame] | 240 | LOCAL_TEST_DATA := \ |
| 241 | $(call find-test-data-in-subdirs, $(LOCAL_PATH), "*", testdata) |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 242 | include $(BUILD_HOST_NATIVE_TEST) |