2014-10-17 02:39:31 +02:00
|
|
|
#
|
|
|
|
# Copyright (C) 2014 The Android Open Source Project
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
2013-10-09 19:14:35 +02:00
|
|
|
|
2014-10-17 02:39:31 +02:00
|
|
|
LOCAL_PATH := $(call my-dir)
|
2013-10-09 19:14:35 +02:00
|
|
|
|
2016-02-04 02:02:09 +01:00
|
|
|
# Unit tests
|
2014-10-17 02:39:31 +02:00
|
|
|
include $(CLEAR_VARS)
|
2016-09-28 20:42:17 +02:00
|
|
|
LOCAL_CFLAGS := -Werror
|
2016-02-04 02:02:09 +01:00
|
|
|
LOCAL_MODULE := recovery_unit_test
|
2017-03-29 02:22:41 +02:00
|
|
|
LOCAL_COMPATIBILITY_SUITE := device-tests
|
2016-04-20 00:02:41 +02:00
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
|
|
|
libverifier \
|
2016-09-09 05:10:11 +02:00
|
|
|
libminui \
|
|
|
|
libotautil \
|
2017-03-26 22:36:49 +02:00
|
|
|
libupdater \
|
2016-09-09 05:10:11 +02:00
|
|
|
libziparchive \
|
|
|
|
libutils \
|
|
|
|
libz \
|
|
|
|
libselinux \
|
|
|
|
libbase
|
2016-04-20 00:02:41 +02:00
|
|
|
|
2016-11-04 18:52:13 +01:00
|
|
|
LOCAL_SRC_FILES := \
|
|
|
|
unit/asn1_decoder_test.cpp \
|
2016-12-22 18:28:03 +01:00
|
|
|
unit/dirutil_test.cpp \
|
2016-11-04 18:52:13 +01:00
|
|
|
unit/locale_test.cpp \
|
2017-03-26 22:36:49 +02:00
|
|
|
unit/rangeset_test.cpp \
|
2016-11-04 18:52:13 +01:00
|
|
|
unit/sysutil_test.cpp \
|
2016-12-22 02:58:42 +01:00
|
|
|
unit/zip_test.cpp \
|
|
|
|
unit/ziputil_test.cpp
|
2016-11-04 18:52:13 +01:00
|
|
|
|
2016-02-04 02:02:09 +01:00
|
|
|
LOCAL_C_INCLUDES := bootable/recovery
|
2016-03-09 23:58:16 +01:00
|
|
|
LOCAL_SHARED_LIBRARIES := liblog
|
2016-02-04 02:02:09 +01:00
|
|
|
include $(BUILD_NATIVE_TEST)
|
2016-11-07 23:45:59 +01:00
|
|
|
|
|
|
|
# Manual tests
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_CFLAGS := -Werror
|
|
|
|
LOCAL_MODULE := recovery_manual_test
|
2017-01-09 20:18:29 +01:00
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
|
|
|
libminui \
|
|
|
|
libbase
|
2016-11-07 23:45:59 +01:00
|
|
|
|
|
|
|
LOCAL_SRC_FILES := manual/recovery_test.cpp
|
2017-01-09 20:18:29 +01:00
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
|
|
|
liblog \
|
|
|
|
libpng
|
|
|
|
|
|
|
|
resource_files := $(call find-files-in-subdirs, bootable/recovery, \
|
|
|
|
"*_text.png", \
|
|
|
|
res-mdpi/images \
|
|
|
|
res-hdpi/images \
|
|
|
|
res-xhdpi/images \
|
|
|
|
res-xxhdpi/images \
|
|
|
|
res-xxxhdpi/images \
|
|
|
|
)
|
|
|
|
|
|
|
|
# The resource image files that will go to $OUT/data/nativetest/recovery.
|
|
|
|
testimage_out_path := $(TARGET_OUT_DATA)/nativetest/recovery
|
|
|
|
GEN := $(addprefix $(testimage_out_path)/, $(resource_files))
|
|
|
|
|
|
|
|
$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
|
|
|
|
$(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@
|
|
|
|
$(GEN): $(testimage_out_path)/% : bootable/recovery/%
|
|
|
|
$(transform-generated-source)
|
|
|
|
LOCAL_GENERATED_SOURCES += $(GEN)
|
|
|
|
|
2016-11-07 23:45:59 +01:00
|
|
|
include $(BUILD_NATIVE_TEST)
|
2016-02-04 02:02:09 +01:00
|
|
|
|
|
|
|
# Component tests
|
|
|
|
include $(CLEAR_VARS)
|
2017-03-16 08:48:21 +01:00
|
|
|
LOCAL_CFLAGS := \
|
|
|
|
-Werror \
|
|
|
|
-D_FILE_OFFSET_BITS=64
|
|
|
|
|
2016-02-04 02:02:09 +01:00
|
|
|
LOCAL_MODULE := recovery_component_test
|
2017-03-29 02:22:41 +02:00
|
|
|
LOCAL_COMPATIBILITY_SUITE := device-tests
|
2016-02-04 02:02:09 +01:00
|
|
|
LOCAL_C_INCLUDES := bootable/recovery
|
2016-03-10 02:51:34 +01:00
|
|
|
LOCAL_SRC_FILES := \
|
2016-10-11 00:48:37 +02:00
|
|
|
component/applypatch_test.cpp \
|
2016-12-15 00:52:34 +01:00
|
|
|
component/bootloader_message_test.cpp \
|
2016-10-04 00:26:06 +02:00
|
|
|
component/edify_test.cpp \
|
2016-12-15 19:15:06 +01:00
|
|
|
component/imgdiff_test.cpp \
|
2017-03-02 22:46:37 +01:00
|
|
|
component/sideload_test.cpp \
|
2016-12-13 02:10:20 +01:00
|
|
|
component/uncrypt_test.cpp \
|
2016-10-11 00:48:37 +02:00
|
|
|
component/updater_test.cpp \
|
|
|
|
component/verifier_test.cpp
|
2016-12-13 02:10:20 +01:00
|
|
|
|
2016-02-04 02:02:09 +01:00
|
|
|
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
2016-10-11 00:48:37 +02:00
|
|
|
|
|
|
|
tune2fs_static_libraries := \
|
|
|
|
libext2_com_err \
|
|
|
|
libext2_blkid \
|
|
|
|
libext2_quota \
|
2017-01-14 02:32:20 +01:00
|
|
|
libext2_uuid \
|
2016-10-11 00:48:37 +02:00
|
|
|
libext2_e2p \
|
|
|
|
libext2fs
|
|
|
|
|
2016-02-04 02:02:09 +01:00
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
2016-10-25 23:17:26 +02:00
|
|
|
libapplypatch_modes \
|
2016-03-10 02:51:34 +01:00
|
|
|
libapplypatch \
|
2016-10-04 00:26:06 +02:00
|
|
|
libedify \
|
2016-12-15 19:15:06 +01:00
|
|
|
libimgdiff \
|
|
|
|
libimgpatch \
|
|
|
|
libbsdiff \
|
2016-05-11 00:23:25 +02:00
|
|
|
libbspatch \
|
2016-03-10 02:51:34 +01:00
|
|
|
libotafault \
|
2016-10-11 00:48:37 +02:00
|
|
|
libupdater \
|
2016-11-18 21:01:26 +01:00
|
|
|
libbootloader_message \
|
2016-02-04 02:02:09 +01:00
|
|
|
libverifier \
|
2016-09-09 05:10:11 +02:00
|
|
|
libotautil \
|
2016-10-11 00:48:37 +02:00
|
|
|
libmounts \
|
2016-12-15 19:15:06 +01:00
|
|
|
libdivsufsort \
|
|
|
|
libdivsufsort64 \
|
2016-11-18 21:01:26 +01:00
|
|
|
libfs_mgr \
|
2016-10-11 00:48:37 +02:00
|
|
|
liblog \
|
|
|
|
libselinux \
|
2017-01-11 23:02:13 +01:00
|
|
|
libext4_utils \
|
2017-01-11 23:38:20 +01:00
|
|
|
libsparse \
|
2016-10-11 00:48:37 +02:00
|
|
|
libcrypto_utils \
|
|
|
|
libcrypto \
|
2016-02-04 02:02:09 +01:00
|
|
|
libcutils \
|
2016-03-10 02:51:34 +01:00
|
|
|
libbz \
|
2016-11-15 06:29:52 +01:00
|
|
|
libziparchive \
|
|
|
|
libutils \
|
2016-03-10 02:51:34 +01:00
|
|
|
libz \
|
2016-08-06 03:00:04 +02:00
|
|
|
libbase \
|
2016-10-11 00:48:37 +02:00
|
|
|
libtune2fs \
|
2017-03-16 08:48:21 +01:00
|
|
|
libfec \
|
|
|
|
libfec_rs \
|
|
|
|
libsquashfs_utils \
|
|
|
|
libcutils \
|
2016-10-11 00:48:37 +02:00
|
|
|
$(tune2fs_static_libraries)
|
2016-02-04 02:02:09 +01:00
|
|
|
|
|
|
|
testdata_files := $(call find-subdir-files, testdata/*)
|
|
|
|
|
2016-11-03 00:17:17 +01:00
|
|
|
# The testdata files that will go to $OUT/data/nativetest/recovery.
|
|
|
|
testdata_out_path := $(TARGET_OUT_DATA)/nativetest/recovery
|
2016-02-04 02:02:09 +01:00
|
|
|
GEN := $(addprefix $(testdata_out_path)/, $(testdata_files))
|
|
|
|
$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
|
|
|
|
$(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@
|
|
|
|
$(GEN): $(testdata_out_path)/% : $(LOCAL_PATH)/%
|
|
|
|
$(transform-generated-source)
|
|
|
|
LOCAL_GENERATED_SOURCES += $(GEN)
|
2016-10-26 00:05:40 +02:00
|
|
|
|
2016-11-03 00:17:17 +01:00
|
|
|
# A copy of the testdata to be packed into continuous_native_tests.zip.
|
|
|
|
testdata_continuous_zip_prefix := \
|
|
|
|
$(call intermediates-dir-for,PACKAGING,recovery_component_test)/DATA
|
|
|
|
testdata_continuous_zip_path := $(testdata_continuous_zip_prefix)/nativetest/recovery
|
|
|
|
GEN := $(addprefix $(testdata_continuous_zip_path)/, $(testdata_files))
|
|
|
|
$(GEN): PRIVATE_PATH := $(LOCAL_PATH)
|
|
|
|
$(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@
|
|
|
|
$(GEN): $(testdata_continuous_zip_path)/% : $(LOCAL_PATH)/%
|
2016-10-26 00:05:40 +02:00
|
|
|
$(transform-generated-source)
|
2016-11-03 00:17:17 +01:00
|
|
|
LOCAL_GENERATED_SOURCES += $(GEN)
|
|
|
|
LOCAL_PICKUP_FILES := $(testdata_continuous_zip_prefix)
|
2016-10-26 00:05:40 +02:00
|
|
|
|
2014-10-17 02:39:31 +02:00
|
|
|
include $(BUILD_NATIVE_TEST)
|
2016-12-15 19:15:06 +01:00
|
|
|
|
|
|
|
# Host tests
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_CFLAGS := -Werror
|
|
|
|
LOCAL_MODULE := recovery_host_test
|
|
|
|
LOCAL_MODULE_HOST_OS := linux
|
|
|
|
LOCAL_C_INCLUDES := bootable/recovery
|
|
|
|
LOCAL_SRC_FILES := \
|
|
|
|
component/imgdiff_test.cpp
|
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
|
|
|
libimgdiff \
|
|
|
|
libimgpatch \
|
|
|
|
libbsdiff \
|
2016-05-11 00:23:25 +02:00
|
|
|
libbspatch \
|
2016-12-15 19:15:06 +01:00
|
|
|
libziparchive \
|
2017-02-23 03:23:58 +01:00
|
|
|
libutils \
|
2016-12-15 19:15:06 +01:00
|
|
|
libbase \
|
|
|
|
libcrypto \
|
|
|
|
libbz \
|
|
|
|
libdivsufsort64 \
|
|
|
|
libdivsufsort \
|
|
|
|
libz
|
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
|
|
|
liblog
|
|
|
|
include $(BUILD_HOST_NATIVE_TEST)
|