blob: 262fb8bfd673b6f58cc80e08333ab38ed63620b1 [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
26LOCAL_C_INCLUDES := bootable/recovery
27include $(BUILD_NATIVE_TEST)
28
29# Component tests
Kenny Root7a4adb52013-10-09 10:14:35 -070030include $(CLEAR_VARS)
Tao Bao80e46e02015-06-03 10:49:29 -070031LOCAL_CLANG := true
Dan Albert13f21c22014-10-16 17:39:31 -070032LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Jed Estep43291862016-02-03 17:02:09 -080033LOCAL_MODULE := recovery_component_test
34LOCAL_C_INCLUDES := bootable/recovery
35LOCAL_SRC_FILES := component/verifier_test.cpp
36LOCAL_FORCE_STATIC_EXECUTABLE := true
37LOCAL_STATIC_LIBRARIES := \
38 libbase \
39 libverifier \
40 libmincrypt \
41 libminui \
42 libminzip \
43 libcutils \
44 libc
45
Jed Estepd5a14c62016-02-05 11:24:27 -080046testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery
Jed Estep43291862016-02-03 17:02:09 -080047testdata_files := $(call find-subdir-files, testdata/*)
48
49GEN := $(addprefix $(testdata_out_path)/, $(testdata_files))
50$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
51$(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@
52$(GEN): $(testdata_out_path)/% : $(LOCAL_PATH)/%
53 $(transform-generated-source)
54LOCAL_GENERATED_SOURCES += $(GEN)
Dan Albert13f21c22014-10-16 17:39:31 -070055include $(BUILD_NATIVE_TEST)