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