blob: 7b004b2a05f91acae856ed06f36f734207dc3116 [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
Dan Albert13f21c22014-10-16 17:39:31 -070034LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Jed Estep43291862016-02-03 17:02:09 -080035LOCAL_MODULE := recovery_component_test
36LOCAL_C_INCLUDES := bootable/recovery
37LOCAL_SRC_FILES := component/verifier_test.cpp
38LOCAL_FORCE_STATIC_EXECUTABLE := true
39LOCAL_STATIC_LIBRARIES := \
40 libbase \
41 libverifier \
Mattias Nissler452df6d2016-04-04 16:17:01 +020042 libcrypto_utils_static \
43 libcrypto_static \
Jed Estep43291862016-02-03 17:02:09 -080044 libminui \
45 libminzip \
46 libcutils \
47 libc
48
Jed Estepd5a14c62016-02-05 11:24:27 -080049testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery
Jed Estep43291862016-02-03 17:02:09 -080050testdata_files := $(call find-subdir-files, testdata/*)
51
52GEN := $(addprefix $(testdata_out_path)/, $(testdata_files))
53$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
54$(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@
55$(GEN): $(testdata_out_path)/% : $(LOCAL_PATH)/%
56 $(transform-generated-source)
57LOCAL_GENERATED_SOURCES += $(GEN)
Dan Albert13f21c22014-10-16 17:39:31 -070058include $(BUILD_NATIVE_TEST)