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 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [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 |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 20 | # include $(CLEAR_VARS) |
| 21 | # LOCAL_CFLAGS := -Wall -Werror |
| 22 | # LOCAL_MODULE := recovery_unit_test |
| 23 | # LOCAL_COMPATIBILITY_SUITE := device-tests |
| 24 | # LOCAL_STATIC_LIBRARIES := \ |
| 25 | # libverifier \ |
| 26 | # libminui \ |
| 27 | # libotautil \ |
| 28 | # libupdater \ |
| 29 | # libziparchive \ |
| 30 | # libutils \ |
| 31 | # libz \ |
| 32 | # libselinux \ |
| 33 | # libbase \ |
| 34 | # libBionicGtestMain |
Tianjie Xu | 2430e29 | 2016-04-19 15:02:41 -0700 | [diff] [blame] | 35 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 36 | # LOCAL_SRC_FILES := \ |
| 37 | # unit/asn1_decoder_test.cpp \ |
| 38 | # unit/dirutil_test.cpp \ |
| 39 | # unit/locale_test.cpp \ |
| 40 | # unit/rangeset_test.cpp \ |
| 41 | # unit/sysutil_test.cpp \ |
| 42 | # unit/zip_test.cpp \ |
| 43 | # unit/ziputil_test.cpp |
Tao Bao | c3292f3 | 2016-11-04 10:52:13 -0700 | [diff] [blame] | 44 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 45 | # LOCAL_C_INCLUDES := $(commands_recovery_local_path) |
| 46 | # LOCAL_SHARED_LIBRARIES := liblog |
| 47 | # include $(BUILD_NATIVE_TEST) |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 48 | |
Tianjie Xu | 5d8b53b | 2016-11-07 14:45:59 -0800 | [diff] [blame] | 49 | # Manual tests |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 50 | # include $(CLEAR_VARS) |
| 51 | # LOCAL_CFLAGS := -Wall -Werror |
| 52 | # LOCAL_MODULE := recovery_manual_test |
| 53 | # LOCAL_STATIC_LIBRARIES := \ |
| 54 | # libminui \ |
| 55 | # libbase \ |
| 56 | # libBionicGtestMain |
Tianjie Xu | 5d8b53b | 2016-11-07 14:45:59 -0800 | [diff] [blame] | 57 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 58 | # LOCAL_SRC_FILES := manual/recovery_test.cpp |
| 59 | # LOCAL_SHARED_LIBRARIES := \ |
| 60 | # liblog \ |
| 61 | # libpng |
Tianjie Xu | d17a688 | 2017-01-09 11:18:29 -0800 | [diff] [blame] | 62 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 63 | # resource_files := $(call find-files-in-subdirs, bootable/recovery, \ |
| 64 | # "*_text.png", \ |
| 65 | # res-mdpi/images \ |
| 66 | # res-hdpi/images \ |
| 67 | # res-xhdpi/images \ |
| 68 | # res-xxhdpi/images \ |
| 69 | # res-xxxhdpi/images \ |
| 70 | # ) |
Tianjie Xu | d17a688 | 2017-01-09 11:18:29 -0800 | [diff] [blame] | 71 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 72 | # # The resource image files that will go to $OUT/data/nativetest/recovery. |
| 73 | # testimage_out_path := $(TARGET_OUT_DATA)/nativetest/recovery |
| 74 | # GEN := $(addprefix $(testimage_out_path)/, $(resource_files)) |
Tianjie Xu | d17a688 | 2017-01-09 11:18:29 -0800 | [diff] [blame] | 75 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 76 | # $(GEN): PRIVATE_PATH := $(LOCAL_PATH) |
| 77 | # $(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@ |
| 78 | # $(GEN): $(testimage_out_path)/% : bootable/recovery/% |
| 79 | # $(transform-generated-source) |
| 80 | # LOCAL_GENERATED_SOURCES += $(GEN) |
Tianjie Xu | d17a688 | 2017-01-09 11:18:29 -0800 | [diff] [blame] | 81 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 82 | # include $(BUILD_NATIVE_TEST) |
Tianjie Xu | 5d8b53b | 2016-11-07 14:45:59 -0800 | [diff] [blame] | 83 | |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 84 | # Component tests |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 85 | # include $(CLEAR_VARS) |
| 86 | # LOCAL_CFLAGS := \ |
| 87 | # -Wall \ |
| 88 | # -Werror \ |
| 89 | # -D_FILE_OFFSET_BITS=64 |
Tianjie Xu | 56ebe62 | 2017-03-16 00:48:21 -0700 | [diff] [blame] | 90 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 91 | # ifeq ($(AB_OTA_UPDATER),true) |
| 92 | # LOCAL_CFLAGS += -DAB_OTA_UPDATER=1 |
| 93 | # endif |
Tao Bao | a233a89 | 2017-04-17 16:46:05 -0700 | [diff] [blame] | 94 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 95 | # ifeq ($(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VERITY),true) |
| 96 | # LOCAL_CFLAGS += -DPRODUCT_SUPPORTS_VERITY=1 |
| 97 | # endif |
Tao Bao | 83b0780 | 2017-04-26 14:30:56 -0700 | [diff] [blame] | 98 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 99 | # ifeq ($(BOARD_AVB_ENABLE),true) |
| 100 | # LOCAL_CFLAGS += -DBOARD_AVB_ENABLE=1 |
| 101 | # endif |
David Zeuthen | 8ed9738 | 2017-05-08 13:41:28 -0400 | [diff] [blame] | 102 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 103 | # LOCAL_MODULE := recovery_component_test |
| 104 | # LOCAL_COMPATIBILITY_SUITE := device-tests |
| 105 | # LOCAL_C_INCLUDES := $(commands_recovery_local_path) |
| 106 | # LOCAL_SRC_FILES := \ |
| 107 | # component/applypatch_test.cpp \ |
| 108 | # component/bootloader_message_test.cpp \ |
| 109 | # component/edify_test.cpp \ |
| 110 | # component/imgdiff_test.cpp \ |
| 111 | # component/install_test.cpp \ |
| 112 | # component/sideload_test.cpp \ |
| 113 | # component/uncrypt_test.cpp \ |
| 114 | # component/updater_test.cpp \ |
| 115 | # component/update_verifier_test.cpp \ |
| 116 | # component/verifier_test.cpp |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 117 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 118 | # LOCAL_SHARED_LIBRARIES := \ |
| 119 | # libhidlbase |
Tao Bao | 0c7839a | 2016-10-10 15:48:37 -0700 | [diff] [blame] | 120 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 121 | # tune2fs_static_libraries := \ |
| 122 | # libext2_com_err \ |
| 123 | # libext2_blkid \ |
| 124 | # libext2_quota \ |
| 125 | # libext2_uuid \ |
| 126 | # libext2_e2p \ |
| 127 | # libext2fs |
Tao Bao | 0c7839a | 2016-10-10 15:48:37 -0700 | [diff] [blame] | 128 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 129 | # LOCAL_STATIC_LIBRARIES := \ |
| 130 | # libapplypatch_modes \ |
| 131 | # libapplypatch \ |
| 132 | # libedify \ |
| 133 | # libimgdiff \ |
| 134 | # libimgpatch \ |
| 135 | # libbsdiff \ |
| 136 | # libbspatch \ |
| 137 | # libfusesideload \ |
| 138 | # libotafault \ |
| 139 | # librecovery \ |
| 140 | # libupdater \ |
| 141 | # libbootloader_message \ |
| 142 | # libverifier \ |
| 143 | # libotautil \ |
| 144 | # libmounts \ |
| 145 | # libupdate_verifier \ |
| 146 | # libdivsufsort \ |
| 147 | # libdivsufsort64 \ |
| 148 | # libfs_mgr \ |
| 149 | # libvintf_recovery \ |
| 150 | # libvintf \ |
| 151 | # libhidl-gen-utils \ |
| 152 | # libtinyxml2 \ |
| 153 | # libselinux \ |
| 154 | # libext4_utils \ |
| 155 | # libsparse \ |
| 156 | # libcrypto_utils \ |
| 157 | # libcrypto \ |
| 158 | # libbz \ |
| 159 | # libziparchive \ |
| 160 | # liblog \ |
| 161 | # libutils \ |
| 162 | # libz \ |
| 163 | # libbase \ |
| 164 | # libtune2fs \ |
| 165 | # libfec \ |
| 166 | # libfec_rs \ |
| 167 | # libsquashfs_utils \ |
| 168 | # libcutils \ |
| 169 | # libbrotli \ |
| 170 | # libBionicGtestMain \ |
| 171 | # $(tune2fs_static_libraries) |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 172 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 173 | # testdata_files := $(call find-subdir-files, testdata/*) |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 174 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 175 | # # The testdata files that will go to $OUT/data/nativetest/recovery. |
| 176 | # testdata_out_path := $(TARGET_OUT_DATA)/nativetest/recovery |
| 177 | # GEN := $(addprefix $(testdata_out_path)/, $(testdata_files)) |
| 178 | # $(GEN): PRIVATE_PATH := $(LOCAL_PATH) |
| 179 | # $(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@ |
| 180 | # $(GEN): $(testdata_out_path)/% : $(LOCAL_PATH)/% |
| 181 | # $(transform-generated-source) |
| 182 | # LOCAL_GENERATED_SOURCES += $(GEN) |
Tao Bao | f1338fb | 2016-10-25 15:05:40 -0700 | [diff] [blame] | 183 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 184 | # # A copy of the testdata to be packed into continuous_native_tests.zip. |
| 185 | # testdata_continuous_zip_prefix := \ |
| 186 | # $(call intermediates-dir-for,PACKAGING,recovery_component_test)/DATA |
| 187 | # testdata_continuous_zip_path := $(testdata_continuous_zip_prefix)/nativetest/recovery |
| 188 | # GEN := $(addprefix $(testdata_continuous_zip_path)/, $(testdata_files)) |
| 189 | # $(GEN): PRIVATE_PATH := $(LOCAL_PATH) |
| 190 | # $(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@ |
| 191 | # $(GEN): $(testdata_continuous_zip_path)/% : $(LOCAL_PATH)/% |
| 192 | # $(transform-generated-source) |
| 193 | # LOCAL_GENERATED_SOURCES += $(GEN) |
| 194 | # LOCAL_PICKUP_FILES := $(testdata_continuous_zip_prefix) |
Tao Bao | f1338fb | 2016-10-25 15:05:40 -0700 | [diff] [blame] | 195 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 196 | # include $(BUILD_NATIVE_TEST) |
Tao Bao | 97555da | 2016-12-15 10:15:06 -0800 | [diff] [blame] | 197 | |
| 198 | # Host tests |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 199 | # include $(CLEAR_VARS) |
| 200 | # LOCAL_CFLAGS := -Wall -Werror |
| 201 | # LOCAL_MODULE := recovery_host_test |
| 202 | # LOCAL_MODULE_HOST_OS := linux |
| 203 | # LOCAL_C_INCLUDES := bootable/recovery |
| 204 | # LOCAL_SRC_FILES := \ |
| 205 | # component/imgdiff_test.cpp |
| 206 | # LOCAL_STATIC_LIBRARIES := \ |
| 207 | # libimgdiff \ |
| 208 | # libimgpatch \ |
| 209 | # libotautil \ |
| 210 | # libbsdiff \ |
| 211 | # libbspatch \ |
| 212 | # libziparchive \ |
| 213 | # libutils \ |
| 214 | # libbase \ |
| 215 | # libcrypto \ |
| 216 | # libbrotli \ |
| 217 | # libbz \ |
| 218 | # libdivsufsort64 \ |
| 219 | # libdivsufsort \ |
| 220 | # libz \ |
| 221 | # libBionicGtestMain |
| 222 | # LOCAL_SHARED_LIBRARIES := \ |
| 223 | # liblog |
| 224 | # include $(BUILD_HOST_NATIVE_TEST) |