blob: 2576ea0ef2ac101643197bcd0841cfee6c6b6ef1 [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
152librecovery_static_libraries := \
153 librecovery \
154 $(TARGET_RECOVERY_UI_LIB) \
155 libbootloader_message \
156 libfusesideload \
157 libminadbd \
158 librecovery_ui \
159 libminui \
Jed Estep43291862016-02-03 17:02:09 -0800160 libverifier \
Tianjie Xu8cf5c8f2016-09-08 20:10:11 -0700161 libotautil \
Tao Bao9e309972018-05-11 15:13:10 -0700162 libasyncio \
163 libbatterymonitor \
164 libcrypto_utils \
165 libcrypto \
166 libext4_utils \
Tao Baobedf5fc2016-11-18 12:01:26 -0800167 libfs_mgr \
Tao Bao6b28f052018-04-13 13:41:58 -0700168 libpng \
Tao Bao9e309972018-05-11 15:13:10 -0700169 libsparse \
Tao Bao919d2c92017-04-10 16:55:57 -0700170 libvintf_recovery \
171 libvintf \
Yifan Hong495c5212018-03-06 17:59:58 -0800172 libhidl-gen-utils \
Tao Bao919d2c92017-04-10 16:55:57 -0700173 libtinyxml2 \
Tao Baoef0eb3b2016-11-14 21:29:52 -0800174 libziparchive \
Tianjie Xu7b0ad9c2016-08-05 18:00:04 -0700175 libbase \
Tao Bao9e309972018-05-11 15:13:10 -0700176 libutils \
Tao Bao371fe6e2017-10-11 20:25:36 -0700177 libcutils \
Tao Bao9e309972018-05-11 15:13:10 -0700178 liblog \
179 libselinux \
180 libz \
181
182libupdate_verifier_static_libraries := \
183 libupdate_verifier \
184
185LOCAL_STATIC_LIBRARIES := \
186 $(libapplypatch_static_libraries) \
187 $(librecovery_static_libraries) \
188 $(libupdate_verifier_static_libraries) \
189 $(libupdater_static_libraries) \
190 libBionicGtestMain
Jed Estep43291862016-02-03 17:02:09 -0800191
Tao Bao9d91e892018-03-30 20:43:45 -0700192LOCAL_TEST_DATA := \
Tao Bao6b28f052018-04-13 13:41:58 -0700193 $(call find-test-data-in-subdirs, $(LOCAL_PATH), "*", testdata) \
194 $(call find-test-data-in-subdirs, bootable/recovery, "*_text.png", res-*)
Dan Albert13f21c22014-10-16 17:39:31 -0700195include $(BUILD_NATIVE_TEST)
Tao Bao97555da2016-12-15 10:15:06 -0800196
197# Host tests
198include $(CLEAR_VARS)
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700199LOCAL_CFLAGS := -Wall -Werror
Tao Bao97555da2016-12-15 10:15:06 -0800200LOCAL_MODULE := recovery_host_test
201LOCAL_MODULE_HOST_OS := linux
202LOCAL_C_INCLUDES := bootable/recovery
203LOCAL_SRC_FILES := \
204 component/imgdiff_test.cpp
205LOCAL_STATIC_LIBRARIES := \
206 libimgdiff \
207 libimgpatch \
Tao Bao09e468f2017-09-29 14:39:33 -0700208 libotautil \
Tao Bao97555da2016-12-15 10:15:06 -0800209 libbsdiff \
Sen Jiang25c56972016-05-10 15:23:25 -0700210 libbspatch \
Tao Bao97555da2016-12-15 10:15:06 -0800211 libziparchive \
Tianjie Xu1ea84d62017-02-22 18:23:58 -0800212 libutils \
Tao Bao97555da2016-12-15 10:15:06 -0800213 libbase \
214 libcrypto \
Tianjie Xu8c280812017-10-28 22:13:16 -0700215 libbrotli \
Tao Bao97555da2016-12-15 10:15:06 -0800216 libbz \
217 libdivsufsort64 \
218 libdivsufsort \
Tianjie Xua88cc542017-10-25 13:16:54 -0700219 libz \
220 libBionicGtestMain
Tao Bao97555da2016-12-15 10:15:06 -0800221LOCAL_SHARED_LIBRARIES := \
222 liblog
Tao Bao9d91e892018-03-30 20:43:45 -0700223LOCAL_TEST_DATA := \
224 $(call find-test-data-in-subdirs, $(LOCAL_PATH), "*", testdata)
Tao Bao97555da2016-12-15 10:15:06 -0800225include $(BUILD_HOST_NATIVE_TEST)