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