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 |
Tianjie Xu | 7aa8874 | 2016-09-28 11:42:17 -0700 | [diff] [blame] | 22 | LOCAL_CFLAGS := -Werror |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 23 | LOCAL_MODULE := recovery_unit_test |
| 24 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Tianjie Xu | 2430e29 | 2016-04-19 15:02:41 -0700 | [diff] [blame] | 25 | LOCAL_STATIC_LIBRARIES := \ |
| 26 | libverifier \ |
Tianjie Xu | 8cf5c8f | 2016-09-08 20:10:11 -0700 | [diff] [blame] | 27 | libminui \ |
| 28 | libotautil \ |
| 29 | libziparchive \ |
| 30 | libutils \ |
| 31 | libz \ |
| 32 | libselinux \ |
| 33 | libbase |
Tianjie Xu | 2430e29 | 2016-04-19 15:02:41 -0700 | [diff] [blame] | 34 | |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 35 | LOCAL_SRC_FILES := unit/asn1_decoder_test.cpp |
Mark Salyzyn | a4f701a | 2016-03-09 14:58:16 -0800 | [diff] [blame] | 36 | LOCAL_SRC_FILES += unit/recovery_test.cpp |
Tianjie Xu | 2430e29 | 2016-04-19 15:02:41 -0700 | [diff] [blame] | 37 | LOCAL_SRC_FILES += unit/locale_test.cpp |
Tianjie Xu | 8cf5c8f | 2016-09-08 20:10:11 -0700 | [diff] [blame] | 38 | LOCAL_SRC_FILES += unit/zip_test.cpp |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 39 | LOCAL_C_INCLUDES := bootable/recovery |
Mark Salyzyn | a4f701a | 2016-03-09 14:58:16 -0800 | [diff] [blame] | 40 | LOCAL_SHARED_LIBRARIES := liblog |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 41 | include $(BUILD_NATIVE_TEST) |
| 42 | |
| 43 | # Component tests |
Kenny Root | 7a4adb5 | 2013-10-09 10:14:35 -0700 | [diff] [blame] | 44 | include $(CLEAR_VARS) |
Tao Bao | 80e46e0 | 2015-06-03 10:49:29 -0700 | [diff] [blame] | 45 | LOCAL_CLANG := true |
Tao Bao | 36c3511 | 2016-10-25 14:17:26 -0700 | [diff] [blame] | 46 | LOCAL_CFLAGS := -Werror |
Dan Albert | 13f21c2 | 2014-10-16 17:39:31 -0700 | [diff] [blame] | 47 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 48 | LOCAL_MODULE := recovery_component_test |
| 49 | LOCAL_C_INCLUDES := bootable/recovery |
Jed Estep | b8a693b | 2016-03-09 17:51:34 -0800 | [diff] [blame] | 50 | LOCAL_SRC_FILES := \ |
Tao Bao | 0c7839a | 2016-10-10 15:48:37 -0700 | [diff] [blame] | 51 | component/applypatch_test.cpp \ |
Tao Bao | d770d2e | 2016-10-03 15:26:06 -0700 | [diff] [blame] | 52 | component/edify_test.cpp \ |
Tao Bao | 0c7839a | 2016-10-10 15:48:37 -0700 | [diff] [blame] | 53 | component/updater_test.cpp \ |
| 54 | component/verifier_test.cpp |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 55 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
Tao Bao | 0c7839a | 2016-10-10 15:48:37 -0700 | [diff] [blame] | 56 | |
| 57 | tune2fs_static_libraries := \ |
| 58 | libext2_com_err \ |
| 59 | libext2_blkid \ |
| 60 | libext2_quota \ |
| 61 | libext2_uuid_static \ |
| 62 | libext2_e2p \ |
| 63 | libext2fs |
| 64 | |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 65 | LOCAL_STATIC_LIBRARIES := \ |
Tao Bao | 36c3511 | 2016-10-25 14:17:26 -0700 | [diff] [blame] | 66 | libapplypatch_modes \ |
Jed Estep | b8a693b | 2016-03-09 17:51:34 -0800 | [diff] [blame] | 67 | libapplypatch \ |
Tao Bao | d770d2e | 2016-10-03 15:26:06 -0700 | [diff] [blame] | 68 | libedify \ |
Jed Estep | b8a693b | 2016-03-09 17:51:34 -0800 | [diff] [blame] | 69 | libotafault \ |
Tao Bao | 0c7839a | 2016-10-10 15:48:37 -0700 | [diff] [blame] | 70 | libupdater \ |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 71 | libverifier \ |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 72 | libminui \ |
Tianjie Xu | 8cf5c8f | 2016-09-08 20:10:11 -0700 | [diff] [blame] | 73 | libotautil \ |
Tao Bao | 0c7839a | 2016-10-10 15:48:37 -0700 | [diff] [blame] | 74 | libmounts \ |
| 75 | liblog \ |
| 76 | libselinux \ |
| 77 | libext4_utils_static \ |
| 78 | libsparse_static \ |
| 79 | libcrypto_utils \ |
| 80 | libcrypto \ |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 81 | libcutils \ |
Jed Estep | b8a693b | 2016-03-09 17:51:34 -0800 | [diff] [blame] | 82 | libbz \ |
| 83 | libz \ |
Tianjie Xu | 7b0ad9c | 2016-08-05 18:00:04 -0700 | [diff] [blame] | 84 | libbase \ |
Tao Bao | 0c7839a | 2016-10-10 15:48:37 -0700 | [diff] [blame] | 85 | libtune2fs \ |
| 86 | $(tune2fs_static_libraries) |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 87 | |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 88 | testdata_files := $(call find-subdir-files, testdata/*) |
| 89 | |
Tao Bao | 4102b28 | 2016-11-02 16:17:17 -0700 | [diff] [blame] | 90 | # The testdata files that will go to $OUT/data/nativetest/recovery. |
| 91 | testdata_out_path := $(TARGET_OUT_DATA)/nativetest/recovery |
Jed Estep | 4329186 | 2016-02-03 17:02:09 -0800 | [diff] [blame] | 92 | GEN := $(addprefix $(testdata_out_path)/, $(testdata_files)) |
| 93 | $(GEN): PRIVATE_PATH := $(LOCAL_PATH) |
| 94 | $(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@ |
| 95 | $(GEN): $(testdata_out_path)/% : $(LOCAL_PATH)/% |
| 96 | $(transform-generated-source) |
| 97 | LOCAL_GENERATED_SOURCES += $(GEN) |
Tao Bao | f1338fb | 2016-10-25 15:05:40 -0700 | [diff] [blame] | 98 | |
Tao Bao | 4102b28 | 2016-11-02 16:17:17 -0700 | [diff] [blame] | 99 | # A copy of the testdata to be packed into continuous_native_tests.zip. |
| 100 | testdata_continuous_zip_prefix := \ |
| 101 | $(call intermediates-dir-for,PACKAGING,recovery_component_test)/DATA |
| 102 | testdata_continuous_zip_path := $(testdata_continuous_zip_prefix)/nativetest/recovery |
| 103 | GEN := $(addprefix $(testdata_continuous_zip_path)/, $(testdata_files)) |
| 104 | $(GEN): PRIVATE_PATH := $(LOCAL_PATH) |
| 105 | $(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@ |
| 106 | $(GEN): $(testdata_continuous_zip_path)/% : $(LOCAL_PATH)/% |
Tao Bao | f1338fb | 2016-10-25 15:05:40 -0700 | [diff] [blame] | 107 | $(transform-generated-source) |
Tao Bao | 4102b28 | 2016-11-02 16:17:17 -0700 | [diff] [blame] | 108 | LOCAL_GENERATED_SOURCES += $(GEN) |
| 109 | LOCAL_PICKUP_FILES := $(testdata_continuous_zip_prefix) |
Tao Bao | f1338fb | 2016-10-25 15:05:40 -0700 | [diff] [blame] | 110 | |
Dan Albert | 13f21c2 | 2014-10-16 17:39:31 -0700 | [diff] [blame] | 111 | include $(BUILD_NATIVE_TEST) |