blob: 633b3c451b1f85b04f320aa87ce2eacb6ab43f1f [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)
21LOCAL_CLANG := true
22LOCAL_MODULE := recovery_unit_test
23LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Tianjie Xu2430e292016-04-19 15:02:41 -070024LOCAL_STATIC_LIBRARIES := \
25 libverifier \
26 libminui
27
Jed Estep43291862016-02-03 17:02:09 -080028LOCAL_SRC_FILES := unit/asn1_decoder_test.cpp
Mark Salyzyna4f701a2016-03-09 14:58:16 -080029LOCAL_SRC_FILES += unit/recovery_test.cpp
Tianjie Xu2430e292016-04-19 15:02:41 -070030LOCAL_SRC_FILES += unit/locale_test.cpp
Jed Estep43291862016-02-03 17:02:09 -080031LOCAL_C_INCLUDES := bootable/recovery
Mark Salyzyna4f701a2016-03-09 14:58:16 -080032LOCAL_SHARED_LIBRARIES := liblog
Jed Estep43291862016-02-03 17:02:09 -080033include $(BUILD_NATIVE_TEST)
34
35# Component tests
Kenny Root7a4adb52013-10-09 10:14:35 -070036include $(CLEAR_VARS)
Tao Bao80e46e02015-06-03 10:49:29 -070037LOCAL_CLANG := true
Jed Estepb8a693b2016-03-09 17:51:34 -080038LOCAL_CFLAGS += -Wno-unused-parameter
Dan Albert13f21c22014-10-16 17:39:31 -070039LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Jed Estep43291862016-02-03 17:02:09 -080040LOCAL_MODULE := recovery_component_test
41LOCAL_C_INCLUDES := bootable/recovery
Jed Estepb8a693b2016-03-09 17:51:34 -080042LOCAL_SRC_FILES := \
43 component/verifier_test.cpp \
44 component/applypatch_test.cpp
Jed Estep43291862016-02-03 17:02:09 -080045LOCAL_FORCE_STATIC_EXECUTABLE := true
46LOCAL_STATIC_LIBRARIES := \
Jed Estepb8a693b2016-03-09 17:51:34 -080047 libapplypatch \
48 libotafault \
Jed Estep43291862016-02-03 17:02:09 -080049 libverifier \
Josh Gao073164f2016-08-05 15:59:05 -070050 libcrypto_utils \
51 libcrypto \
Jed Estep43291862016-02-03 17:02:09 -080052 libminui \
53 libminzip \
54 libcutils \
Jed Estepb8a693b2016-03-09 17:51:34 -080055 libbz \
56 libz \
Tianjie Xu7b0ad9c2016-08-05 18:00:04 -070057 libc \
58 libbase \
59 liblog
Jed Estep43291862016-02-03 17:02:09 -080060
Jed Estepb8a693b2016-03-09 17:51:34 -080061testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery
Jed Estep43291862016-02-03 17:02:09 -080062testdata_files := $(call find-subdir-files, testdata/*)
63
64GEN := $(addprefix $(testdata_out_path)/, $(testdata_files))
65$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
66$(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@
67$(GEN): $(testdata_out_path)/% : $(LOCAL_PATH)/%
68 $(transform-generated-source)
69LOCAL_GENERATED_SOURCES += $(GEN)
Dan Albert13f21c22014-10-16 17:39:31 -070070include $(BUILD_NATIVE_TEST)