blob: e68e77eb0dcd4345cbc2c73b29b68c3d227c9691 [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
Tao Baob8cb2e62018-07-06 12:14:36 -070019# libapplypatch, libapplypatch_modes, libimgdiff, libimgpatch.
20libapplypatch_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 Estep43291862016-02-03 17:02:09 -080040# Unit tests
41include $(CLEAR_VARS)
Tianjie Xuc89d1e72017-08-28 14:15:07 -070042LOCAL_CFLAGS := -Wall -Werror
Jed Estep43291862016-02-03 17:02:09 -080043LOCAL_MODULE := recovery_unit_test
Dan Shi73683162017-03-28 17:22:41 -070044LOCAL_COMPATIBILITY_SUITE := device-tests
Tianjie Xu2430e292016-04-19 15:02:41 -070045LOCAL_STATIC_LIBRARIES := \
Tao Baob8cb2e62018-07-06 12:14:36 -070046 $(libapplypatch_static_libraries) \
Tianjie Xu2430e292016-04-19 15:02:41 -070047 libverifier \
Tianjie Xu5fe5eb62018-03-20 16:07:39 -070048 librecovery_ui \
Tianjie Xu8cf5c8f2016-09-08 20:10:11 -070049 libminui \
50 libotautil \
Tao Bao8f237572017-03-26 13:36:49 -070051 libupdater \
Tao Bao6a7e4af2018-06-14 21:57:43 -070052 libgtest_prod \
Tao Bao6cd81682018-05-03 21:53:11 -070053 libpng \
Tianjie Xu8cf5c8f2016-09-08 20:10:11 -070054 libziparchive \
55 libutils \
56 libz \
57 libselinux \
Tianjie Xua88cc542017-10-25 13:16:54 -070058 libbase \
59 libBionicGtestMain
Tianjie Xu2430e292016-04-19 15:02:41 -070060
Tao Baoc3292f32016-11-04 10:52:13 -070061LOCAL_SRC_FILES := \
Tao Baob8cb2e62018-07-06 12:14:36 -070062 unit/applypatch_test.cpp \
Tao Baoc3292f32016-11-04 10:52:13 -070063 unit/asn1_decoder_test.cpp \
Tao Baoc3901232018-05-21 16:05:56 -070064 unit/commands_test.cpp \
Tao Baof19295c2016-12-22 09:28:03 -080065 unit/dirutil_test.cpp \
Tao Baoc3292f32016-11-04 10:52:13 -070066 unit/locale_test.cpp \
Tao Bao8f237572017-03-26 13:36:49 -070067 unit/rangeset_test.cpp \
Tianjie Xu5fe5eb62018-03-20 16:07:39 -070068 unit/screen_ui_test.cpp \
Tao Baoc3292f32016-11-04 10:52:13 -070069 unit/sysutil_test.cpp \
Tianjie Xu5fe5eb62018-03-20 16:07:39 -070070 unit/zip_test.cpp
Tao Baoc3292f32016-11-04 10:52:13 -070071
Jed Estep43291862016-02-03 17:02:09 -080072LOCAL_C_INCLUDES := bootable/recovery
Mark Salyzyna4f701a2016-03-09 14:58:16 -080073LOCAL_SHARED_LIBRARIES := liblog
Tao Bao9d91e892018-03-30 20:43:45 -070074LOCAL_TEST_DATA := \
75 $(call find-test-data-in-subdirs, $(LOCAL_PATH), "*", testdata)
Jed Estep43291862016-02-03 17:02:09 -080076include $(BUILD_NATIVE_TEST)
77
Tianjie Xu5d8b53b2016-11-07 14:45:59 -080078# Manual tests
79include $(CLEAR_VARS)
Tianjie Xuc89d1e72017-08-28 14:15:07 -070080LOCAL_CFLAGS := -Wall -Werror
Tianjie Xu5d8b53b2016-11-07 14:45:59 -080081LOCAL_MODULE := recovery_manual_test
Tianjie Xud17a6882017-01-09 11:18:29 -080082LOCAL_STATIC_LIBRARIES := \
Tianjie Xua88cc542017-10-25 13:16:54 -070083 libbase \
84 libBionicGtestMain
Tianjie Xu5d8b53b2016-11-07 14:45:59 -080085
86LOCAL_SRC_FILES := manual/recovery_test.cpp
Tianjie Xud17a6882017-01-09 11:18:29 -080087LOCAL_SHARED_LIBRARIES := \
Tao Bao6b28f052018-04-13 13:41:58 -070088 liblog
Tianjie Xud17a6882017-01-09 11:18:29 -080089
Tianjie Xu5d8b53b2016-11-07 14:45:59 -080090include $(BUILD_NATIVE_TEST)
91
Jed Estep43291862016-02-03 17:02:09 -080092# Component tests
Kenny Root7a4adb52013-10-09 10:14:35 -070093include $(CLEAR_VARS)
Tianjie Xu56ebe622017-03-16 00:48:21 -070094LOCAL_CFLAGS := \
Tianjie Xuc89d1e72017-08-28 14:15:07 -070095 -Wall \
Tianjie Xu56ebe622017-03-16 00:48:21 -070096 -Werror \
97 -D_FILE_OFFSET_BITS=64
98
Jed Estep43291862016-02-03 17:02:09 -080099LOCAL_MODULE := recovery_component_test
Dan Shi73683162017-03-28 17:22:41 -0700100LOCAL_COMPATIBILITY_SUITE := device-tests
Jed Estep43291862016-02-03 17:02:09 -0800101LOCAL_C_INCLUDES := bootable/recovery
Jed Estepb8a693b2016-03-09 17:51:34 -0800102LOCAL_SRC_FILES := \
Tao Baob8cb2e62018-07-06 12:14:36 -0700103 component/applypatch_modes_test.cpp \
Tao Bao8b7301b2016-12-14 15:52:34 -0800104 component/bootloader_message_test.cpp \
Tao Baod770d2e2016-10-03 15:26:06 -0700105 component/edify_test.cpp \
Tao Bao97555da2016-12-15 10:15:06 -0800106 component/imgdiff_test.cpp \
Tao Bao1d866052017-04-10 16:55:57 -0700107 component/install_test.cpp \
Tao Bao6b28f052018-04-13 13:41:58 -0700108 component/resources_test.cpp \
Wei Wangb72a15a2017-03-02 13:46:37 -0800109 component/sideload_test.cpp \
Tao Bao10334082016-12-12 17:10:20 -0800110 component/uncrypt_test.cpp \
Tao Bao0c7839a2016-10-10 15:48:37 -0700111 component/updater_test.cpp \
Tao Bao83b07802017-04-26 14:30:56 -0700112 component/update_verifier_test.cpp \
Tao Bao0c7839a2016-10-10 15:48:37 -0700113 component/verifier_test.cpp
Tao Bao10334082016-12-12 17:10:20 -0800114
Tao Bao3e2345e2017-08-09 16:33:07 -0700115LOCAL_SHARED_LIBRARIES := \
Tianjie Xu4d9e62d2018-05-11 10:41:44 -0700116 libhidlbase \
117 libprotobuf-cpp-lite
Tao Bao0c7839a2016-10-10 15:48:37 -0700118
119tune2fs_static_libraries := \
120 libext2_com_err \
121 libext2_blkid \
122 libext2_quota \
Alex Deymo7c5dbd62017-01-13 17:32:20 -0800123 libext2_uuid \
Tao Bao0c7839a2016-10-10 15:48:37 -0700124 libext2_e2p \
125 libext2fs
126
Tao Bao9e309972018-05-11 15:13:10 -0700127libupdater_static_libraries := \
Tao Bao0c7839a2016-10-10 15:48:37 -0700128 libupdater \
Tao Bao9e309972018-05-11 15:13:10 -0700129 libapplypatch \
130 libbspatch \
131 libedify \
132 libziparchive \
133 libotautil \
Tao Baobedf5fc2016-11-18 12:01:26 -0800134 libbootloader_message \
Tao Bao9e309972018-05-11 15:13:10 -0700135 libutils \
136 libotafault \
137 libext4_utils \
138 libfec \
139 libfec_rs \
140 libfs_mgr \
Tao Bao6a7e4af2018-06-14 21:57:43 -0700141 libgtest_prod \
Tao Bao9e309972018-05-11 15:13:10 -0700142 liblog \
143 libselinux \
144 libsparse \
145 libsquashfs_utils \
146 libbz \
147 libz \
148 libbase \
149 libcrypto \
150 libcrypto_utils \
151 libcutils \
152 libtune2fs \
153 libbrotli \
154 $(tune2fs_static_libraries)
155
156librecovery_static_libraries := \
157 librecovery \
158 $(TARGET_RECOVERY_UI_LIB) \
159 libbootloader_message \
160 libfusesideload \
161 libminadbd \
162 librecovery_ui \
163 libminui \
Jed Estep43291862016-02-03 17:02:09 -0800164 libverifier \
Tianjie Xu8cf5c8f2016-09-08 20:10:11 -0700165 libotautil \
Tao Bao9e309972018-05-11 15:13:10 -0700166 libasyncio \
167 libbatterymonitor \
168 libcrypto_utils \
169 libcrypto \
170 libext4_utils \
Tao Baobedf5fc2016-11-18 12:01:26 -0800171 libfs_mgr \
Tao Bao6b28f052018-04-13 13:41:58 -0700172 libpng \
Tao Bao9e309972018-05-11 15:13:10 -0700173 libsparse \
Tao Bao919d2c92017-04-10 16:55:57 -0700174 libvintf_recovery \
175 libvintf \
Yifan Hong495c5212018-03-06 17:59:58 -0800176 libhidl-gen-utils \
Tao Bao919d2c92017-04-10 16:55:57 -0700177 libtinyxml2 \
Tao Baoef0eb3b2016-11-14 21:29:52 -0800178 libziparchive \
Tianjie Xu7b0ad9c2016-08-05 18:00:04 -0700179 libbase \
Tao Bao9e309972018-05-11 15:13:10 -0700180 libutils \
Tao Bao371fe6e2017-10-11 20:25:36 -0700181 libcutils \
Tao Bao9e309972018-05-11 15:13:10 -0700182 liblog \
183 libselinux \
184 libz \
185
186libupdate_verifier_static_libraries := \
187 libupdate_verifier \
188
189LOCAL_STATIC_LIBRARIES := \
190 $(libapplypatch_static_libraries) \
191 $(librecovery_static_libraries) \
192 $(libupdate_verifier_static_libraries) \
193 $(libupdater_static_libraries) \
194 libBionicGtestMain
Jed Estep43291862016-02-03 17:02:09 -0800195
Tao Bao9d91e892018-03-30 20:43:45 -0700196LOCAL_TEST_DATA := \
Tao Bao6b28f052018-04-13 13:41:58 -0700197 $(call find-test-data-in-subdirs, $(LOCAL_PATH), "*", testdata) \
198 $(call find-test-data-in-subdirs, bootable/recovery, "*_text.png", res-*)
Dan Albert13f21c22014-10-16 17:39:31 -0700199include $(BUILD_NATIVE_TEST)
Tao Bao97555da2016-12-15 10:15:06 -0800200
201# Host tests
202include $(CLEAR_VARS)
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700203LOCAL_CFLAGS := -Wall -Werror
Tao Bao97555da2016-12-15 10:15:06 -0800204LOCAL_MODULE := recovery_host_test
205LOCAL_MODULE_HOST_OS := linux
206LOCAL_C_INCLUDES := bootable/recovery
207LOCAL_SRC_FILES := \
208 component/imgdiff_test.cpp
209LOCAL_STATIC_LIBRARIES := \
210 libimgdiff \
211 libimgpatch \
Tao Bao09e468f2017-09-29 14:39:33 -0700212 libotautil \
Tao Bao97555da2016-12-15 10:15:06 -0800213 libbsdiff \
Sen Jiang25c56972016-05-10 15:23:25 -0700214 libbspatch \
Tao Bao97555da2016-12-15 10:15:06 -0800215 libziparchive \
Tianjie Xu1ea84d62017-02-22 18:23:58 -0800216 libutils \
Tao Bao97555da2016-12-15 10:15:06 -0800217 libbase \
218 libcrypto \
Tianjie Xu8c280812017-10-28 22:13:16 -0700219 libbrotli \
Tao Bao97555da2016-12-15 10:15:06 -0800220 libbz \
221 libdivsufsort64 \
222 libdivsufsort \
Tianjie Xua88cc542017-10-25 13:16:54 -0700223 libz \
224 libBionicGtestMain
Tao Bao97555da2016-12-15 10:15:06 -0800225LOCAL_SHARED_LIBRARIES := \
226 liblog
Tao Bao9d91e892018-03-30 20:43:45 -0700227LOCAL_TEST_DATA := \
228 $(call find-test-data-in-subdirs, $(LOCAL_PATH), "*", testdata)
Tao Bao97555da2016-12-15 10:15:06 -0800229include $(BUILD_HOST_NATIVE_TEST)