blob: d8cbf1c59a1e2b34be261e4b48189c613dcdf485 [file] [log] [blame]
Dan Albert13f21c22014-10-16 17:39:31 -07001#
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 Root7a4adb52013-10-09 10:14:35 -070017LOCAL_PATH := $(call my-dir)
Dan Albert13f21c22014-10-16 17:39:31 -070018
Jed Estep43291862016-02-03 17:02:09 -080019# Unit tests
20include $(CLEAR_VARS)
Tianjie Xuc89d1e72017-08-28 14:15:07 -070021LOCAL_CFLAGS := -Wall -Werror
Jed Estep43291862016-02-03 17:02:09 -080022LOCAL_MODULE := recovery_unit_test
Dan Shi73683162017-03-28 17:22:41 -070023LOCAL_COMPATIBILITY_SUITE := device-tests
Tianjie Xu2430e292016-04-19 15:02:41 -070024LOCAL_STATIC_LIBRARIES := \
25 libverifier \
Tianjie Xu5fe5eb62018-03-20 16:07:39 -070026 librecovery_ui \
Tianjie Xu8cf5c8f2016-09-08 20:10:11 -070027 libminui \
28 libotautil \
Tao Bao8f237572017-03-26 13:36:49 -070029 libupdater \
Tao Bao6a7e4af2018-06-14 21:57:43 -070030 libgtest_prod \
Tao Bao6cd81682018-05-03 21:53:11 -070031 libpng \
Tianjie Xu8cf5c8f2016-09-08 20:10:11 -070032 libziparchive \
33 libutils \
34 libz \
35 libselinux \
Tianjie Xua88cc542017-10-25 13:16:54 -070036 libbase \
37 libBionicGtestMain
Tianjie Xu2430e292016-04-19 15:02:41 -070038
Tao Baoc3292f32016-11-04 10:52:13 -070039LOCAL_SRC_FILES := \
40 unit/asn1_decoder_test.cpp \
Tao Baoc3901232018-05-21 16:05:56 -070041 unit/commands_test.cpp \
Tao Baof19295c2016-12-22 09:28:03 -080042 unit/dirutil_test.cpp \
Tao Baoc3292f32016-11-04 10:52:13 -070043 unit/locale_test.cpp \
Tao Bao8f237572017-03-26 13:36:49 -070044 unit/rangeset_test.cpp \
Tianjie Xu5fe5eb62018-03-20 16:07:39 -070045 unit/screen_ui_test.cpp \
Tao Baoc3292f32016-11-04 10:52:13 -070046 unit/sysutil_test.cpp \
Tianjie Xu5fe5eb62018-03-20 16:07:39 -070047 unit/zip_test.cpp
Tao Baoc3292f32016-11-04 10:52:13 -070048
Jed Estep43291862016-02-03 17:02:09 -080049LOCAL_C_INCLUDES := bootable/recovery
Mark Salyzyna4f701a2016-03-09 14:58:16 -080050LOCAL_SHARED_LIBRARIES := liblog
Tao Bao9d91e892018-03-30 20:43:45 -070051LOCAL_TEST_DATA := \
52 $(call find-test-data-in-subdirs, $(LOCAL_PATH), "*", testdata)
Jed Estep43291862016-02-03 17:02:09 -080053include $(BUILD_NATIVE_TEST)
54
Tianjie Xu5d8b53b2016-11-07 14:45:59 -080055# Manual tests
56include $(CLEAR_VARS)
Tianjie Xuc89d1e72017-08-28 14:15:07 -070057LOCAL_CFLAGS := -Wall -Werror
Tianjie Xu5d8b53b2016-11-07 14:45:59 -080058LOCAL_MODULE := recovery_manual_test
Tianjie Xud17a6882017-01-09 11:18:29 -080059LOCAL_STATIC_LIBRARIES := \
Tianjie Xua88cc542017-10-25 13:16:54 -070060 libbase \
61 libBionicGtestMain
Tianjie Xu5d8b53b2016-11-07 14:45:59 -080062
63LOCAL_SRC_FILES := manual/recovery_test.cpp
Tianjie Xud17a6882017-01-09 11:18:29 -080064LOCAL_SHARED_LIBRARIES := \
Tao Bao6b28f052018-04-13 13:41:58 -070065 liblog
Tianjie Xud17a6882017-01-09 11:18:29 -080066
Tianjie Xu5d8b53b2016-11-07 14:45:59 -080067include $(BUILD_NATIVE_TEST)
68
Jed Estep43291862016-02-03 17:02:09 -080069# Component tests
Kenny Root7a4adb52013-10-09 10:14:35 -070070include $(CLEAR_VARS)
Tianjie Xu56ebe622017-03-16 00:48:21 -070071LOCAL_CFLAGS := \
Tianjie Xuc89d1e72017-08-28 14:15:07 -070072 -Wall \
Tianjie Xu56ebe622017-03-16 00:48:21 -070073 -Werror \
74 -D_FILE_OFFSET_BITS=64
75
Jed Estep43291862016-02-03 17:02:09 -080076LOCAL_MODULE := recovery_component_test
Dan Shi73683162017-03-28 17:22:41 -070077LOCAL_COMPATIBILITY_SUITE := device-tests
Jed Estep43291862016-02-03 17:02:09 -080078LOCAL_C_INCLUDES := bootable/recovery
Jed Estepb8a693b2016-03-09 17:51:34 -080079LOCAL_SRC_FILES := \
Tao Bao0c7839a2016-10-10 15:48:37 -070080 component/applypatch_test.cpp \
Tao Bao8b7301b2016-12-14 15:52:34 -080081 component/bootloader_message_test.cpp \
Tao Baod770d2e2016-10-03 15:26:06 -070082 component/edify_test.cpp \
Tao Bao97555da2016-12-15 10:15:06 -080083 component/imgdiff_test.cpp \
Tao Bao1d866052017-04-10 16:55:57 -070084 component/install_test.cpp \
Tao Bao6b28f052018-04-13 13:41:58 -070085 component/resources_test.cpp \
Wei Wangb72a15a2017-03-02 13:46:37 -080086 component/sideload_test.cpp \
Tao Bao10334082016-12-12 17:10:20 -080087 component/uncrypt_test.cpp \
Tao Bao0c7839a2016-10-10 15:48:37 -070088 component/updater_test.cpp \
Tao Bao83b07802017-04-26 14:30:56 -070089 component/update_verifier_test.cpp \
Tao Bao0c7839a2016-10-10 15:48:37 -070090 component/verifier_test.cpp
Tao Bao10334082016-12-12 17:10:20 -080091
Tao Bao3e2345e2017-08-09 16:33:07 -070092LOCAL_SHARED_LIBRARIES := \
93 libhidlbase
Tao Bao0c7839a2016-10-10 15:48:37 -070094
Tao Bao9e309972018-05-11 15:13:10 -070095# libapplypatch, libapplypatch_modes, libimgdiff, libimgpatch.
96libapplypatch_static_libraries := \
97 libapplypatch_modes \
98 libapplypatch \
99 libedify \
100 libimgdiff \
101 libimgpatch \
102 libotafault \
103 libotautil \
104 libbsdiff \
105 libbspatch \
106 libdivsufsort \
107 libdivsufsort64 \
108 libutils \
109 libbase \
110 libbz \
111 libcrypto \
112 libz \
113 libziparchive \
114
Tao Bao0c7839a2016-10-10 15:48:37 -0700115tune2fs_static_libraries := \
116 libext2_com_err \
117 libext2_blkid \
118 libext2_quota \
Alex Deymo7c5dbd62017-01-13 17:32:20 -0800119 libext2_uuid \
Tao Bao0c7839a2016-10-10 15:48:37 -0700120 libext2_e2p \
121 libext2fs
122
Tao Bao9e309972018-05-11 15:13:10 -0700123libupdater_static_libraries := \
Tao Bao0c7839a2016-10-10 15:48:37 -0700124 libupdater \
Tao Bao9e309972018-05-11 15:13:10 -0700125 libapplypatch \
126 libbspatch \
127 libedify \
128 libziparchive \
129 libotautil \
Tao Baobedf5fc2016-11-18 12:01:26 -0800130 libbootloader_message \
Tao Bao9e309972018-05-11 15:13:10 -0700131 libutils \
132 libotafault \
133 libext4_utils \
134 libfec \
135 libfec_rs \
136 libfs_mgr \
Tao Bao6a7e4af2018-06-14 21:57:43 -0700137 libgtest_prod \
Tao Bao9e309972018-05-11 15:13:10 -0700138 liblog \
139 libselinux \
140 libsparse \
141 libsquashfs_utils \
142 libbz \
143 libz \
144 libbase \
145 libcrypto \
146 libcrypto_utils \
147 libcutils \
148 libtune2fs \
149 libbrotli \
150 $(tune2fs_static_libraries)
151
Tao Baofd0ace82017-10-11 20:25:36 -0700152health_hal_static_libraries := \
153 android.hardware.health@2.0-impl \
154 android.hardware.health@2.0 \
155 android.hardware.health@1.0 \
156 android.hardware.health@1.0-convert \
157 libhealthstoragedefault \
158 libhidltransport \
159 libhidlbase \
160 libhwbinder_noltopgo \
161 libvndksupport \
162 libbatterymonitor
163
Tao Bao9e309972018-05-11 15:13:10 -0700164librecovery_static_libraries := \
165 librecovery \
166 $(TARGET_RECOVERY_UI_LIB) \
167 libbootloader_message \
168 libfusesideload \
169 libminadbd \
170 librecovery_ui \
171 libminui \
Jed Estep43291862016-02-03 17:02:09 -0800172 libverifier \
Tianjie Xu8cf5c8f2016-09-08 20:10:11 -0700173 libotautil \
Tao Baofd0ace82017-10-11 20:25:36 -0700174 $(health_hal_static_libraries) \
Tao Bao9e309972018-05-11 15:13:10 -0700175 libasyncio \
Tao Bao9e309972018-05-11 15:13:10 -0700176 libcrypto_utils \
177 libcrypto \
178 libext4_utils \
Tao Baobedf5fc2016-11-18 12:01:26 -0800179 libfs_mgr \
Tao Bao6b28f052018-04-13 13:41:58 -0700180 libpng \
Tao Bao9e309972018-05-11 15:13:10 -0700181 libsparse \
Tao Bao919d2c92017-04-10 16:55:57 -0700182 libvintf_recovery \
183 libvintf \
Yifan Hong495c5212018-03-06 17:59:58 -0800184 libhidl-gen-utils \
Tao Bao919d2c92017-04-10 16:55:57 -0700185 libtinyxml2 \
Tao Baoef0eb3b2016-11-14 21:29:52 -0800186 libziparchive \
Tianjie Xu7b0ad9c2016-08-05 18:00:04 -0700187 libbase \
Tao Bao9e309972018-05-11 15:13:10 -0700188 libutils \
Tao Baofd0ace82017-10-11 20:25:36 -0700189 libcutils \
Tao Bao9e309972018-05-11 15:13:10 -0700190 liblog \
191 libselinux \
192 libz \
193
194libupdate_verifier_static_libraries := \
195 libupdate_verifier \
196
197LOCAL_STATIC_LIBRARIES := \
198 $(libapplypatch_static_libraries) \
199 $(librecovery_static_libraries) \
200 $(libupdate_verifier_static_libraries) \
201 $(libupdater_static_libraries) \
202 libBionicGtestMain
Jed Estep43291862016-02-03 17:02:09 -0800203
Tao Bao9d91e892018-03-30 20:43:45 -0700204LOCAL_TEST_DATA := \
Tao Bao6b28f052018-04-13 13:41:58 -0700205 $(call find-test-data-in-subdirs, $(LOCAL_PATH), "*", testdata) \
206 $(call find-test-data-in-subdirs, bootable/recovery, "*_text.png", res-*)
Dan Albert13f21c22014-10-16 17:39:31 -0700207include $(BUILD_NATIVE_TEST)
Tao Bao97555da2016-12-15 10:15:06 -0800208
209# Host tests
210include $(CLEAR_VARS)
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700211LOCAL_CFLAGS := -Wall -Werror
Tao Bao97555da2016-12-15 10:15:06 -0800212LOCAL_MODULE := recovery_host_test
213LOCAL_MODULE_HOST_OS := linux
214LOCAL_C_INCLUDES := bootable/recovery
215LOCAL_SRC_FILES := \
216 component/imgdiff_test.cpp
217LOCAL_STATIC_LIBRARIES := \
218 libimgdiff \
219 libimgpatch \
Tao Bao09e468f2017-09-29 14:39:33 -0700220 libotautil \
Tao Bao97555da2016-12-15 10:15:06 -0800221 libbsdiff \
Sen Jiang25c56972016-05-10 15:23:25 -0700222 libbspatch \
Tao Bao97555da2016-12-15 10:15:06 -0800223 libziparchive \
Tianjie Xu1ea84d62017-02-22 18:23:58 -0800224 libutils \
Tao Bao97555da2016-12-15 10:15:06 -0800225 libbase \
226 libcrypto \
Tianjie Xu8c280812017-10-28 22:13:16 -0700227 libbrotli \
Tao Bao97555da2016-12-15 10:15:06 -0800228 libbz \
229 libdivsufsort64 \
230 libdivsufsort \
Tianjie Xua88cc542017-10-25 13:16:54 -0700231 libz \
232 libBionicGtestMain
Tao Bao97555da2016-12-15 10:15:06 -0800233LOCAL_SHARED_LIBRARIES := \
234 liblog
Tao Bao9d91e892018-03-30 20:43:45 -0700235LOCAL_TEST_DATA := \
236 $(call find-test-data-in-subdirs, $(LOCAL_PATH), "*", testdata)
Tao Bao97555da2016-12-15 10:15:06 -0800237include $(BUILD_HOST_NATIVE_TEST)