blob: 81435bea427254544add9a444633dedd2fcefbae [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
24LOCAL_STATIC_LIBRARIES := libverifier
25LOCAL_SRC_FILES := unit/asn1_decoder_test.cpp
Mark Salyzyna4f701a2016-03-09 14:58:16 -080026LOCAL_SRC_FILES += unit/recovery_test.cpp
Jed Estep43291862016-02-03 17:02:09 -080027LOCAL_C_INCLUDES := bootable/recovery
Mark Salyzyna4f701a2016-03-09 14:58:16 -080028LOCAL_SHARED_LIBRARIES := liblog
Jed Estep43291862016-02-03 17:02:09 -080029include $(BUILD_NATIVE_TEST)
30
31# Component tests
Kenny Root7a4adb52013-10-09 10:14:35 -070032include $(CLEAR_VARS)
Tao Bao80e46e02015-06-03 10:49:29 -070033LOCAL_CLANG := true
Jed Estepb8a693b2016-03-09 17:51:34 -080034LOCAL_CFLAGS += -Wno-unused-parameter
Dan Albert13f21c22014-10-16 17:39:31 -070035LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Jed Estep43291862016-02-03 17:02:09 -080036LOCAL_MODULE := recovery_component_test
37LOCAL_C_INCLUDES := bootable/recovery
Jed Estepb8a693b2016-03-09 17:51:34 -080038LOCAL_SRC_FILES := \
39 component/verifier_test.cpp \
40 component/applypatch_test.cpp
Jed Estep43291862016-02-03 17:02:09 -080041LOCAL_FORCE_STATIC_EXECUTABLE := true
42LOCAL_STATIC_LIBRARIES := \
Jed Estepb8a693b2016-03-09 17:51:34 -080043 libapplypatch \
44 libotafault \
45 libmtdutils \
Jed Estep43291862016-02-03 17:02:09 -080046 libbase \
47 libverifier \
Mattias Nissler452df6d2016-04-04 16:17:01 +020048 libcrypto_utils_static \
Jed Estepb8a693b2016-03-09 17:51:34 -080049 libcrypto_static \
Jed Estep43291862016-02-03 17:02:09 -080050 libminui \
51 libminzip \
52 libcutils \
Jed Estepb8a693b2016-03-09 17:51:34 -080053 libbz \
54 libz \
Jed Estep43291862016-02-03 17:02:09 -080055 libc
56
Jed Estepb8a693b2016-03-09 17:51:34 -080057testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery
Jed Estep43291862016-02-03 17:02:09 -080058testdata_files := $(call find-subdir-files, testdata/*)
59
60GEN := $(addprefix $(testdata_out_path)/, $(testdata_files))
61$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
62$(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@
63$(GEN): $(testdata_out_path)/% : $(LOCAL_PATH)/%
64 $(transform-generated-source)
65LOCAL_GENERATED_SOURCES += $(GEN)
Dan Albert13f21c22014-10-16 17:39:31 -070066include $(BUILD_NATIVE_TEST)