blob: a9e64916f41991c97bbada0b6fe9d41211870c79 [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 Bao6cd81682018-05-03 21:53:11 -070030 libpng \
Tianjie Xu8cf5c8f2016-09-08 20:10:11 -070031 libziparchive \
32 libutils \
33 libz \
34 libselinux \
Tianjie Xua88cc542017-10-25 13:16:54 -070035 libbase \
36 libBionicGtestMain
Tianjie Xu2430e292016-04-19 15:02:41 -070037
Tao Baoc3292f32016-11-04 10:52:13 -070038LOCAL_SRC_FILES := \
39 unit/asn1_decoder_test.cpp \
Tao Baoc3901232018-05-21 16:05:56 -070040 unit/commands_test.cpp \
Tao Baof19295c2016-12-22 09:28:03 -080041 unit/dirutil_test.cpp \
Tao Baoc3292f32016-11-04 10:52:13 -070042 unit/locale_test.cpp \
Tao Bao8f237572017-03-26 13:36:49 -070043 unit/rangeset_test.cpp \
Tianjie Xu5fe5eb62018-03-20 16:07:39 -070044 unit/screen_ui_test.cpp \
Tao Baoc3292f32016-11-04 10:52:13 -070045 unit/sysutil_test.cpp \
Tianjie Xu5fe5eb62018-03-20 16:07:39 -070046 unit/zip_test.cpp
Tao Baoc3292f32016-11-04 10:52:13 -070047
Jed Estep43291862016-02-03 17:02:09 -080048LOCAL_C_INCLUDES := bootable/recovery
Mark Salyzyna4f701a2016-03-09 14:58:16 -080049LOCAL_SHARED_LIBRARIES := liblog
Tao Bao9d91e892018-03-30 20:43:45 -070050LOCAL_TEST_DATA := \
51 $(call find-test-data-in-subdirs, $(LOCAL_PATH), "*", testdata)
Jed Estep43291862016-02-03 17:02:09 -080052include $(BUILD_NATIVE_TEST)
53
Tianjie Xu5d8b53b2016-11-07 14:45:59 -080054# Manual tests
55include $(CLEAR_VARS)
Tianjie Xuc89d1e72017-08-28 14:15:07 -070056LOCAL_CFLAGS := -Wall -Werror
Tianjie Xu5d8b53b2016-11-07 14:45:59 -080057LOCAL_MODULE := recovery_manual_test
Tianjie Xud17a6882017-01-09 11:18:29 -080058LOCAL_STATIC_LIBRARIES := \
Tianjie Xua88cc542017-10-25 13:16:54 -070059 libbase \
60 libBionicGtestMain
Tianjie Xu5d8b53b2016-11-07 14:45:59 -080061
62LOCAL_SRC_FILES := manual/recovery_test.cpp
Tianjie Xud17a6882017-01-09 11:18:29 -080063LOCAL_SHARED_LIBRARIES := \
Tao Bao6b28f052018-04-13 13:41:58 -070064 liblog
Tianjie Xud17a6882017-01-09 11:18:29 -080065
Tianjie Xu5d8b53b2016-11-07 14:45:59 -080066include $(BUILD_NATIVE_TEST)
67
Jed Estep43291862016-02-03 17:02:09 -080068# Component tests
Kenny Root7a4adb52013-10-09 10:14:35 -070069include $(CLEAR_VARS)
Tianjie Xu56ebe622017-03-16 00:48:21 -070070LOCAL_CFLAGS := \
Tianjie Xuc89d1e72017-08-28 14:15:07 -070071 -Wall \
Tianjie Xu56ebe622017-03-16 00:48:21 -070072 -Werror \
73 -D_FILE_OFFSET_BITS=64
74
Jed Estep43291862016-02-03 17:02:09 -080075LOCAL_MODULE := recovery_component_test
Dan Shi73683162017-03-28 17:22:41 -070076LOCAL_COMPATIBILITY_SUITE := device-tests
Jed Estep43291862016-02-03 17:02:09 -080077LOCAL_C_INCLUDES := bootable/recovery
Jed Estepb8a693b2016-03-09 17:51:34 -080078LOCAL_SRC_FILES := \
Tao Bao0c7839a2016-10-10 15:48:37 -070079 component/applypatch_test.cpp \
Tao Bao8b7301b2016-12-14 15:52:34 -080080 component/bootloader_message_test.cpp \
Tao Baod770d2e2016-10-03 15:26:06 -070081 component/edify_test.cpp \
Tao Bao97555da2016-12-15 10:15:06 -080082 component/imgdiff_test.cpp \
Tao Bao1d866052017-04-10 16:55:57 -070083 component/install_test.cpp \
Tao Bao6b28f052018-04-13 13:41:58 -070084 component/resources_test.cpp \
Wei Wangb72a15a2017-03-02 13:46:37 -080085 component/sideload_test.cpp \
Tao Bao10334082016-12-12 17:10:20 -080086 component/uncrypt_test.cpp \
Tao Bao0c7839a2016-10-10 15:48:37 -070087 component/updater_test.cpp \
Tao Bao83b07802017-04-26 14:30:56 -070088 component/update_verifier_test.cpp \
Tao Bao0c7839a2016-10-10 15:48:37 -070089 component/verifier_test.cpp
Tao Bao10334082016-12-12 17:10:20 -080090
Tao Bao3e2345e2017-08-09 16:33:07 -070091LOCAL_SHARED_LIBRARIES := \
92 libhidlbase
Tao Bao0c7839a2016-10-10 15:48:37 -070093
Tao Bao9e309972018-05-11 15:13:10 -070094# libapplypatch, libapplypatch_modes, libimgdiff, libimgpatch.
95libapplypatch_static_libraries := \
96 libapplypatch_modes \
97 libapplypatch \
98 libedify \
99 libimgdiff \
100 libimgpatch \
101 libotafault \
102 libotautil \
103 libbsdiff \
104 libbspatch \
105 libdivsufsort \
106 libdivsufsort64 \
107 libutils \
108 libbase \
109 libbz \
110 libcrypto \
111 libz \
112 libziparchive \
113
Tao Bao0c7839a2016-10-10 15:48:37 -0700114tune2fs_static_libraries := \
115 libext2_com_err \
116 libext2_blkid \
117 libext2_quota \
Alex Deymo7c5dbd62017-01-13 17:32:20 -0800118 libext2_uuid \
Tao Bao0c7839a2016-10-10 15:48:37 -0700119 libext2_e2p \
120 libext2fs
121
Tao Bao9e309972018-05-11 15:13:10 -0700122libupdater_static_libraries := \
Tao Bao0c7839a2016-10-10 15:48:37 -0700123 libupdater \
Tao Bao9e309972018-05-11 15:13:10 -0700124 libapplypatch \
125 libbspatch \
126 libedify \
127 libziparchive \
128 libotautil \
Tao Baobedf5fc2016-11-18 12:01:26 -0800129 libbootloader_message \
Tao Bao9e309972018-05-11 15:13:10 -0700130 libutils \
131 libotafault \
132 libext4_utils \
133 libfec \
134 libfec_rs \
135 libfs_mgr \
136 liblog \
137 libselinux \
138 libsparse \
139 libsquashfs_utils \
140 libbz \
141 libz \
142 libbase \
143 libcrypto \
144 libcrypto_utils \
145 libcutils \
146 libtune2fs \
147 libbrotli \
148 $(tune2fs_static_libraries)
149
150librecovery_static_libraries := \
151 librecovery \
152 $(TARGET_RECOVERY_UI_LIB) \
153 libbootloader_message \
154 libfusesideload \
155 libminadbd \
156 librecovery_ui \
157 libminui \
Jed Estep43291862016-02-03 17:02:09 -0800158 libverifier \
Tianjie Xu8cf5c8f2016-09-08 20:10:11 -0700159 libotautil \
Tao Bao9e309972018-05-11 15:13:10 -0700160 libasyncio \
161 libbatterymonitor \
162 libcrypto_utils \
163 libcrypto \
164 libext4_utils \
Tao Baobedf5fc2016-11-18 12:01:26 -0800165 libfs_mgr \
Tao Bao6b28f052018-04-13 13:41:58 -0700166 libpng \
Tao Bao9e309972018-05-11 15:13:10 -0700167 libsparse \
Tao Bao919d2c92017-04-10 16:55:57 -0700168 libvintf_recovery \
169 libvintf \
Yifan Hong495c5212018-03-06 17:59:58 -0800170 libhidl-gen-utils \
Tao Bao919d2c92017-04-10 16:55:57 -0700171 libtinyxml2 \
Tao Baoef0eb3b2016-11-14 21:29:52 -0800172 libziparchive \
Tianjie Xu7b0ad9c2016-08-05 18:00:04 -0700173 libbase \
Tao Bao9e309972018-05-11 15:13:10 -0700174 libutils \
Tao Bao371fe6e2017-10-11 20:25:36 -0700175 libcutils \
Tao Bao9e309972018-05-11 15:13:10 -0700176 liblog \
177 libselinux \
178 libz \
179
180libupdate_verifier_static_libraries := \
181 libupdate_verifier \
182
183LOCAL_STATIC_LIBRARIES := \
184 $(libapplypatch_static_libraries) \
185 $(librecovery_static_libraries) \
186 $(libupdate_verifier_static_libraries) \
187 $(libupdater_static_libraries) \
188 libBionicGtestMain
Jed Estep43291862016-02-03 17:02:09 -0800189
Tao Bao9d91e892018-03-30 20:43:45 -0700190LOCAL_TEST_DATA := \
Tao Bao6b28f052018-04-13 13:41:58 -0700191 $(call find-test-data-in-subdirs, $(LOCAL_PATH), "*", testdata) \
192 $(call find-test-data-in-subdirs, bootable/recovery, "*_text.png", res-*)
Dan Albert13f21c22014-10-16 17:39:31 -0700193include $(BUILD_NATIVE_TEST)
Tao Bao97555da2016-12-15 10:15:06 -0800194
195# Host tests
196include $(CLEAR_VARS)
Tianjie Xuc89d1e72017-08-28 14:15:07 -0700197LOCAL_CFLAGS := -Wall -Werror
Tao Bao97555da2016-12-15 10:15:06 -0800198LOCAL_MODULE := recovery_host_test
199LOCAL_MODULE_HOST_OS := linux
200LOCAL_C_INCLUDES := bootable/recovery
201LOCAL_SRC_FILES := \
202 component/imgdiff_test.cpp
203LOCAL_STATIC_LIBRARIES := \
204 libimgdiff \
205 libimgpatch \
Tao Bao09e468f2017-09-29 14:39:33 -0700206 libotautil \
Tao Bao97555da2016-12-15 10:15:06 -0800207 libbsdiff \
Sen Jiang25c56972016-05-10 15:23:25 -0700208 libbspatch \
Tao Bao97555da2016-12-15 10:15:06 -0800209 libziparchive \
Tianjie Xu1ea84d62017-02-22 18:23:58 -0800210 libutils \
Tao Bao97555da2016-12-15 10:15:06 -0800211 libbase \
212 libcrypto \
Tianjie Xu8c280812017-10-28 22:13:16 -0700213 libbrotli \
Tao Bao97555da2016-12-15 10:15:06 -0800214 libbz \
215 libdivsufsort64 \
216 libdivsufsort \
Tianjie Xua88cc542017-10-25 13:16:54 -0700217 libz \
218 libBionicGtestMain
Tao Bao97555da2016-12-15 10:15:06 -0800219LOCAL_SHARED_LIBRARIES := \
220 liblog
Tao Bao9d91e892018-03-30 20:43:45 -0700221LOCAL_TEST_DATA := \
222 $(call find-test-data-in-subdirs, $(LOCAL_PATH), "*", testdata)
Tao Bao97555da2016-12-15 10:15:06 -0800223include $(BUILD_HOST_NATIVE_TEST)