blob: 9d83c9a49e579610355beb9501c429ab05e22073 [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
Jed Estepb8a693b2016-03-09 17:51:34 -080032LOCAL_CFLAGS += -Wno-unused-parameter
Dan Albert13f21c22014-10-16 17:39:31 -070033LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Jed Estep43291862016-02-03 17:02:09 -080034LOCAL_MODULE := recovery_component_test
35LOCAL_C_INCLUDES := bootable/recovery
Jed Estepb8a693b2016-03-09 17:51:34 -080036LOCAL_SRC_FILES := \
37 component/verifier_test.cpp \
38 component/applypatch_test.cpp
Jed Estep43291862016-02-03 17:02:09 -080039LOCAL_FORCE_STATIC_EXECUTABLE := true
40LOCAL_STATIC_LIBRARIES := \
Jed Estepb8a693b2016-03-09 17:51:34 -080041 libapplypatch \
42 libotafault \
43 libmtdutils \
Jed Estep43291862016-02-03 17:02:09 -080044 libbase \
45 libverifier \
46 libmincrypt \
Jed Estepb8a693b2016-03-09 17:51:34 -080047 libcrypto_static \
Jed Estep43291862016-02-03 17:02:09 -080048 libminui \
49 libminzip \
50 libcutils \
Jed Estepb8a693b2016-03-09 17:51:34 -080051 libbz \
52 libz \
Jed Estep43291862016-02-03 17:02:09 -080053 libc
54
Jed Estepb8a693b2016-03-09 17:51:34 -080055testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery
Jed Estep43291862016-02-03 17:02:09 -080056testdata_files := $(call find-subdir-files, testdata/*)
57
58GEN := $(addprefix $(testdata_out_path)/, $(testdata_files))
59$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
60$(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@
61$(GEN): $(testdata_out_path)/% : $(LOCAL_PATH)/%
62 $(transform-generated-source)
63LOCAL_GENERATED_SOURCES += $(GEN)
Dan Albert13f21c22014-10-16 17:39:31 -070064include $(BUILD_NATIVE_TEST)