1# Copyright (C) 2014 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15LOCAL_PATH := $(call my-dir) 16 17# Unit tests for libkeymaster 18include $(CLEAR_VARS) 19LOCAL_MODULE := keymaster_tests 20LOCAL_SRC_FILES := \ 21 android_keymaster_messages_test.cpp \ 22 android_keymaster_test.cpp \ 23 android_keymaster_test_utils.cpp \ 24 attestation_record_test.cpp \ 25 authorization_set_test.cpp \ 26 hkdf_test.cpp \ 27 hmac_test.cpp \ 28 kdf1_test.cpp \ 29 kdf2_test.cpp \ 30 kdf_test.cpp \ 31 key_blob_test.cpp \ 32 keymaster_enforcement_test.cpp 33 34LOCAL_C_INCLUDES := \ 35 $(LOCAL_PATH)/include 36LOCAL_CFLAGS = -Wall -Werror -Wunused -DKEYMASTER_NAME_TAGS 37LOCAL_CLANG := true 38LOCAL_CLANG_CFLAGS += -Wno-error=unused-const-variable -Wno-error=unused-private-field 39# TODO(krasin): reenable coverage flags, when the new Clang toolchain is released. 40# Currently, if enabled, these flags will cause an internal error in Clang. 41LOCAL_CLANG_CFLAGS += -fno-sanitize-coverage=edge,indirect-calls,8bit-counters,trace-cmp 42LOCAL_MODULE_TAGS := tests 43LOCAL_SHARED_LIBRARIES := \ 44 libsoftkeymasterdevice \ 45 libkeymaster_messages \ 46 libkeymaster1 \ 47 libcrypto \ 48 libsoftkeymaster 49LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 50include $(BUILD_NATIVE_TEST) 51