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)
|
2015-06-03 19:49:29 +02:00
|
|
|
LOCAL_CLANG := true
|
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
|
|
|
|
LOCAL_STATIC_LIBRARIES := libverifier
|
2016-02-04 02:02:09 +01:00
|
|
|
LOCAL_SRC_FILES := unit/asn1_decoder_test.cpp
|
2016-03-09 23:58:16 +01:00
|
|
|
LOCAL_SRC_FILES += unit/recovery_test.cpp
|
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)
|
|
|
|
|
|
|
|
# Component tests
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_CLANG := true
|
2016-03-10 02:51:34 +01:00
|
|
|
LOCAL_CFLAGS += -Wno-unused-parameter
|
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 := \
|
|
|
|
component/verifier_test.cpp \
|
|
|
|
component/applypatch_test.cpp
|
2016-02-04 02:02:09 +01:00
|
|
|
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
2016-03-10 02:51:34 +01:00
|
|
|
libapplypatch \
|
|
|
|
libotafault \
|
|
|
|
libmtdutils \
|
2016-02-04 02:02:09 +01:00
|
|
|
libbase \
|
|
|
|
libverifier \
|
2016-03-10 02:51:34 +01:00
|
|
|
libcrypto_static \
|
2016-02-04 02:02:09 +01:00
|
|
|
libminui \
|
|
|
|
libminzip \
|
|
|
|
libcutils \
|
2016-03-10 02:51:34 +01:00
|
|
|
libbz \
|
|
|
|
libz \
|
2016-02-04 02:02:09 +01:00
|
|
|
libc
|
|
|
|
|
2016-03-10 02:51:34 +01:00
|
|
|
testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery
|
2016-02-04 02:02:09 +01:00
|
|
|
testdata_files := $(call find-subdir-files, testdata/*)
|
|
|
|
|
|
|
|
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)
|
2014-10-17 02:39:31 +02:00
|
|
|
include $(BUILD_NATIVE_TEST)
|