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 | |
Michael Bestas | c86b6d4 | 2017-04-28 22:43:09 +0300 | [diff] [blame] | 19 | ifdef project-path-for |
| 20 | RECOVERY_PATH := $(call project-path-for,recovery) |
| 21 | else |
| 22 | RECOVERY_PATH := bootable/recovery |
| 23 | endif |
| 24 | |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 25 | # Unit tests |
| 26 | include $(CLEAR_VARS) |
| 27 | LOCAL_CLANG := true |
| 28 | LOCAL_MODULE := recovery_unit_test |
| 29 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Tianjie Xu | 2430e29 | 2016-04-19 15:02:41 -0700 | [diff] [blame] | 30 | LOCAL_STATIC_LIBRARIES := \ |
| 31 | libverifier \ |
| 32 | libminui |
| 33 | |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 34 | LOCAL_SRC_FILES := unit/asn1_decoder_test.cpp |
Mark Salyzyn | 13aca59 | 2016-03-09 14:58:16 -0800 | [diff] [blame] | 35 | LOCAL_SRC_FILES += unit/recovery_test.cpp |
Tianjie Xu | 2430e29 | 2016-04-19 15:02:41 -0700 | [diff] [blame] | 36 | LOCAL_SRC_FILES += unit/locale_test.cpp |
Michael Bestas | c86b6d4 | 2017-04-28 22:43:09 +0300 | [diff] [blame] | 37 | LOCAL_C_INCLUDES := $(RECOVERY_PATH) |
Mark Salyzyn | 13aca59 | 2016-03-09 14:58:16 -0800 | [diff] [blame] | 38 | LOCAL_SHARED_LIBRARIES := liblog |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 39 | include $(BUILD_NATIVE_TEST) |
| 40 | |
| 41 | # Component tests |
Kenny Root | 7a4adb5 | 2013-10-09 10:14:35 -0700 | [diff] [blame] | 42 | include $(CLEAR_VARS) |
Tao Bao | 80e46e0 | 2015-06-03 10:49:29 -0700 | [diff] [blame] | 43 | LOCAL_CLANG := true |
Jed Estep | b8a693b | 2016-03-09 17:51:34 -0800 | [diff] [blame] | 44 | LOCAL_CFLAGS += -Wno-unused-parameter |
Dan Albert | 13f21c2 | 2014-10-16 17:39:31 -0700 | [diff] [blame] | 45 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 46 | LOCAL_MODULE := recovery_component_test |
Michael Bestas | c86b6d4 | 2017-04-28 22:43:09 +0300 | [diff] [blame] | 47 | LOCAL_C_INCLUDES := $(RECOVERY_PATH) |
Jed Estep | b8a693b | 2016-03-09 17:51:34 -0800 | [diff] [blame] | 48 | LOCAL_SRC_FILES := \ |
| 49 | component/verifier_test.cpp \ |
| 50 | component/applypatch_test.cpp |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 51 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
| 52 | LOCAL_STATIC_LIBRARIES := \ |
Jed Estep | b8a693b | 2016-03-09 17:51:34 -0800 | [diff] [blame] | 53 | libapplypatch \ |
| 54 | libotafault \ |
| 55 | libmtdutils \ |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 56 | libbase \ |
| 57 | libverifier \ |
Jed Estep | b8a693b | 2016-03-09 17:51:34 -0800 | [diff] [blame] | 58 | libcrypto_static \ |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 59 | libminui \ |
| 60 | libminzip \ |
| 61 | libcutils \ |
Jed Estep | b8a693b | 2016-03-09 17:51:34 -0800 | [diff] [blame] | 62 | libbz \ |
| 63 | libz \ |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 64 | libc |
| 65 | |
Jed Estep | b8a693b | 2016-03-09 17:51:34 -0800 | [diff] [blame] | 66 | testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 67 | testdata_files := $(call find-subdir-files, testdata/*) |
| 68 | |
| 69 | GEN := $(addprefix $(testdata_out_path)/, $(testdata_files)) |
| 70 | $(GEN): PRIVATE_PATH := $(LOCAL_PATH) |
| 71 | $(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@ |
| 72 | $(GEN): $(testdata_out_path)/% : $(LOCAL_PATH)/% |
| 73 | $(transform-generated-source) |
| 74 | LOCAL_GENERATED_SOURCES += $(GEN) |
Dan Albert | 13f21c2 | 2014-10-16 17:39:31 -0700 | [diff] [blame] | 75 | include $(BUILD_NATIVE_TEST) |