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
|
2014-10-17 02:39:31 +02:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
2016-04-20 00:02:41 +02:00
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
|
|
|
libverifier \
|
2016-09-09 05:10:11 +02:00
|
|
|
libminui \
|
|
|
|
libotautil \
|
|
|
|
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 \
|
|
|
|
unit/locale_test.cpp \
|
|
|
|
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_CLANG := true
|
|
|
|
LOCAL_CFLAGS := -Werror
|
|
|
|
LOCAL_MODULE := recovery_manual_test
|
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
|
|
|
LOCAL_STATIC_LIBRARIES := libbase
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES := manual/recovery_test.cpp
|
|
|
|
LOCAL_SHARED_LIBRARIES := liblog
|
|
|
|
include $(BUILD_NATIVE_TEST)
|
2016-02-04 02:02:09 +01:00
|
|
|
|
|
|
|
# Component tests
|
|
|
|
include $(CLEAR_VARS)
|
2016-10-25 23:17:26 +02:00
|
|
|
LOCAL_CFLAGS := -Werror
|
2016-02-04 02:02:09 +01:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
|
|
|
LOCAL_MODULE := recovery_component_test
|
|
|
|
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-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 \
|
|
|
|
libext2_uuid_static \
|
|
|
|
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-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 \
|
|
|
|
libminui \
|
2016-09-09 05:10:11 +02:00
|
|
|
libotautil \
|
2016-10-11 00:48:37 +02:00
|
|
|
libmounts \
|
2016-11-18 21:01:26 +01:00
|
|
|
libfs_mgr \
|
2016-10-11 00:48:37 +02:00
|
|
|
liblog \
|
|
|
|
libselinux \
|
|
|
|
libext4_utils_static \
|
|
|
|
libsparse_static \
|
|
|
|
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 \
|
|
|
|
$(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)
|