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
diff --git a/keymaster/3.0/vts/functional/Android.bp b/keymaster/3.0/vts/functional/Android.bp
new file mode 100644
index 0000000..7d96704
--- /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 4098664..0000000
--- 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 09b8cb2..90a0195 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",
]