blob: 2da19d7a6d9799c798af7a30641b7f8043790aa5 [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 Salyzyn13aca592016-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 Salyzyn13aca592016-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 \
Jed Estepb8a693b2016-03-09 17:51:34 -080048 libcrypto_static \
Jed Estep43291862016-02-03 17:02:09 -080049 libminui \
50 libminzip \
51 libcutils \
Jed Estepb8a693b2016-03-09 17:51:34 -080052 libbz \
53 libz \
Jed Estep43291862016-02-03 17:02:09 -080054 libc
55
Jed Estepb8a693b2016-03-09 17:51:34 -080056testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery
Jed Estep43291862016-02-03 17:02:09 -080057testdata_files := $(call find-subdir-files, testdata/*)
58
59GEN := $(addprefix $(testdata_out_path)/, $(testdata_files))
60$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
61$(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@
62$(GEN): $(testdata_out_path)/% : $(LOCAL_PATH)/%
63 $(transform-generated-source)
64LOCAL_GENERATED_SOURCES += $(GEN)
Dan Albert13f21c22014-10-16 17:39:31 -070065include $(BUILD_NATIVE_TEST)