blob: 5cf00d327d9a48af90ba622f587d7094a5208597 [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
bigbiffd58ba182020-03-23 10:02:29 -040017# LOCAL_PATH := $(call my-dir)
Dan Albert13f21c22014-10-16 17:39:31 -070018
Jed Estep43291862016-02-03 17:02:09 -080019# Unit tests
bigbiffd58ba182020-03-23 10:02:29 -040020# 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 Xu2430e292016-04-19 15:02:41 -070035
bigbiffd58ba182020-03-23 10:02:29 -040036# 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 Baoc3292f32016-11-04 10:52:13 -070044
bigbiffd58ba182020-03-23 10:02:29 -040045# LOCAL_C_INCLUDES := $(commands_recovery_local_path)
46# LOCAL_SHARED_LIBRARIES := liblog
47# include $(BUILD_NATIVE_TEST)
Jed Estep43291862016-02-03 17:02:09 -080048
Tianjie Xu5d8b53b2016-11-07 14:45:59 -080049# Manual tests
bigbiffd58ba182020-03-23 10:02:29 -040050# 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 Xu5d8b53b2016-11-07 14:45:59 -080057
bigbiffd58ba182020-03-23 10:02:29 -040058# LOCAL_SRC_FILES := manual/recovery_test.cpp
59# LOCAL_SHARED_LIBRARIES := \
60# liblog \
61# libpng
Tianjie Xud17a6882017-01-09 11:18:29 -080062
bigbiffd58ba182020-03-23 10:02:29 -040063# 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 Xud17a6882017-01-09 11:18:29 -080071
bigbiffd58ba182020-03-23 10:02:29 -040072# # 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 Xud17a6882017-01-09 11:18:29 -080075
bigbiffd58ba182020-03-23 10:02:29 -040076# $(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 Xud17a6882017-01-09 11:18:29 -080081
bigbiffd58ba182020-03-23 10:02:29 -040082# include $(BUILD_NATIVE_TEST)
Tianjie Xu5d8b53b2016-11-07 14:45:59 -080083
Jed Estep43291862016-02-03 17:02:09 -080084# Component tests
bigbiffd58ba182020-03-23 10:02:29 -040085# include $(CLEAR_VARS)
86# LOCAL_CFLAGS := \
87# -Wall \
88# -Werror \
89# -D_FILE_OFFSET_BITS=64
Tianjie Xu56ebe622017-03-16 00:48:21 -070090
bigbiffd58ba182020-03-23 10:02:29 -040091# ifeq ($(AB_OTA_UPDATER),true)
92# LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
93# endif
Tao Baoa233a892017-04-17 16:46:05 -070094
bigbiffd58ba182020-03-23 10:02:29 -040095# ifeq ($(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VERITY),true)
96# LOCAL_CFLAGS += -DPRODUCT_SUPPORTS_VERITY=1
97# endif
Tao Bao83b07802017-04-26 14:30:56 -070098
bigbiffd58ba182020-03-23 10:02:29 -040099# ifeq ($(BOARD_AVB_ENABLE),true)
100# LOCAL_CFLAGS += -DBOARD_AVB_ENABLE=1
101# endif
David Zeuthen8ed97382017-05-08 13:41:28 -0400102
bigbiffd58ba182020-03-23 10:02:29 -0400103# 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 Estep43291862016-02-03 17:02:09 -0800117
bigbiffd58ba182020-03-23 10:02:29 -0400118# LOCAL_SHARED_LIBRARIES := \
119# libhidlbase
Tao Bao0c7839a2016-10-10 15:48:37 -0700120
bigbiffd58ba182020-03-23 10:02:29 -0400121# tune2fs_static_libraries := \
122# libext2_com_err \
123# libext2_blkid \
124# libext2_quota \
125# libext2_uuid \
126# libext2_e2p \
127# libext2fs
Tao Bao0c7839a2016-10-10 15:48:37 -0700128
bigbiffd58ba182020-03-23 10:02:29 -0400129# 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 Estep43291862016-02-03 17:02:09 -0800172
bigbiffd58ba182020-03-23 10:02:29 -0400173# testdata_files := $(call find-subdir-files, testdata/*)
Jed Estep43291862016-02-03 17:02:09 -0800174
bigbiffd58ba182020-03-23 10:02:29 -0400175# # 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 Baof1338fb2016-10-25 15:05:40 -0700183
bigbiffd58ba182020-03-23 10:02:29 -0400184# # 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 Baof1338fb2016-10-25 15:05:40 -0700195
bigbiffd58ba182020-03-23 10:02:29 -0400196# include $(BUILD_NATIVE_TEST)
Tao Bao97555da2016-12-15 10:15:06 -0800197
198# Host tests
bigbiffd58ba182020-03-23 10:02:29 -0400199# 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)