Dan Albert | 13f21c2 | 2014-10-16 17:39:31 -0700 | [diff] [blame] | 1 | # |
| 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 Root | 7a4adb5 | 2013-10-09 10:14:35 -0700 | [diff] [blame] | 17 | LOCAL_PATH := $(call my-dir) |
Dan Albert | 13f21c2 | 2014-10-16 17:39:31 -0700 | [diff] [blame] | 18 | |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 19 | # Unit tests |
| 20 | include $(CLEAR_VARS) |
| 21 | LOCAL_CLANG := true |
| 22 | LOCAL_MODULE := recovery_unit_test |
| 23 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 24 | LOCAL_STATIC_LIBRARIES := libverifier |
| 25 | LOCAL_SRC_FILES := unit/asn1_decoder_test.cpp |
Mark Salyzyn | a4f701a | 2016-03-09 14:58:16 -0800 | [diff] [blame] | 26 | LOCAL_SRC_FILES += unit/recovery_test.cpp |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 27 | LOCAL_C_INCLUDES := bootable/recovery |
Mark Salyzyn | a4f701a | 2016-03-09 14:58:16 -0800 | [diff] [blame] | 28 | LOCAL_SHARED_LIBRARIES := liblog |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 29 | include $(BUILD_NATIVE_TEST) |
| 30 | |
| 31 | # Component tests |
Kenny Root | 7a4adb5 | 2013-10-09 10:14:35 -0700 | [diff] [blame] | 32 | include $(CLEAR_VARS) |
Tao Bao | 80e46e0 | 2015-06-03 10:49:29 -0700 | [diff] [blame] | 33 | LOCAL_CLANG := true |
Dan Albert | 13f21c2 | 2014-10-16 17:39:31 -0700 | [diff] [blame] | 34 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 35 | LOCAL_MODULE := recovery_component_test |
| 36 | LOCAL_C_INCLUDES := bootable/recovery |
| 37 | LOCAL_SRC_FILES := component/verifier_test.cpp |
| 38 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
| 39 | LOCAL_STATIC_LIBRARIES := \ |
| 40 | libbase \ |
| 41 | libverifier \ |
Mattias Nissler | 452df6d | 2016-04-04 16:17:01 +0200 | [diff] [blame] | 42 | libcrypto_utils_static \ |
| 43 | libcrypto_static \ |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 44 | libminui \ |
| 45 | libminzip \ |
| 46 | libcutils \ |
| 47 | libc |
| 48 | |
Jed Estep | d5a14c6 | 2016-02-05 11:24:27 -0800 | [diff] [blame] | 49 | testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 50 | testdata_files := $(call find-subdir-files, testdata/*) |
| 51 | |
| 52 | GEN := $(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) |
| 57 | LOCAL_GENERATED_SOURCES += $(GEN) |
Dan Albert | 13f21c2 | 2014-10-16 17:39:31 -0700 | [diff] [blame] | 58 | include $(BUILD_NATIVE_TEST) |