From 0631f8ea9a1480ceeab7e6c99b3983db0edaeb07 Mon Sep 17 00:00:00 2001 From: Tri Vo Date: Fri, 4 Aug 2017 13:01:48 -0700 Subject: [PATCH] Keymaster test statically links to dependencies. This test now statically links to libs not guaranteed to be on the device. Bug: 64040096 Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check --skip-preconditions --module VtsHalKeymasterV3_0Target Change-Id: I6a7b8c116153f18f61a71e5b5bef98343a4de43b --- keymaster/3.0/vts/functional/Android.bp | 32 ++++++++++++++++++++ keymaster/3.0/vts/functional/Android.mk | 39 ------------------------- keymaster/Android.bp | 1 + 3 files changed, 33 insertions(+), 39 deletions(-) create mode 100644 keymaster/3.0/vts/functional/Android.bp delete mode 100644 keymaster/3.0/vts/functional/Android.mk diff --git a/keymaster/3.0/vts/functional/Android.bp b/keymaster/3.0/vts/functional/Android.bp new file mode 100644 index 0000000000..7d96704f2e --- /dev/null +++ b/keymaster/3.0/vts/functional/Android.bp @@ -0,0 +1,32 @@ +// +// Copyright (C) 2017 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. +// + +cc_test { + name: "VtsHalKeymasterV3_0TargetTest", + defaults: ["VtsHalTargetTestDefaults"], + srcs: [ + "authorization_set.cpp", + "attestation_record.cpp", + "key_param_output.cpp", + "keymaster_hidl_hal_test.cpp", + "keystore_tags_utils.cpp", + ], + static_libs: [ + "android.hardware.keymaster@3.0", + "libcrypto", + "libsoftkeymasterdevice", + ], +} diff --git a/keymaster/3.0/vts/functional/Android.mk b/keymaster/3.0/vts/functional/Android.mk deleted file mode 100644 index 40986640d4..0000000000 --- a/keymaster/3.0/vts/functional/Android.mk +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 2017 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. - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_MODULE := VtsHalKeymasterV3_0TargetTest -LOCAL_SRC_FILES := \ - authorization_set.cpp \ - attestation_record.cpp \ - key_param_output.cpp \ - keymaster_hidl_hal_test.cpp \ - keystore_tags_utils.cpp \ - -LOCAL_SHARED_LIBRARIES := \ - android.hardware.keymaster@3.0 \ - libcrypto \ - libhidlbase \ - liblog \ - libsoftkeymasterdevice \ - libutils \ - -LOCAL_STATIC_LIBRARIES := \ - VtsHalHidlTargetTestBase \ - -LOCAL_CFLAGS := -Wall -Werror - -include $(BUILD_NATIVE_TEST) diff --git a/keymaster/Android.bp b/keymaster/Android.bp index 09b8cb28d3..90a01955f3 100644 --- a/keymaster/Android.bp +++ b/keymaster/Android.bp @@ -1,4 +1,5 @@ // This is an autogenerated file, do not edit. subdirs = [ "3.0", + "3.0/vts/functional", ]