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