1//
2// Copyright (C) 2020 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17package {
18    // See: http://go/android-license-faq
19    // A large-scale-change added 'default_applicable_licenses' to import
20    // all of the 'license_kinds' from "hardware_interfaces_license"
21    // to get the below license kinds:
22    //   SPDX-license-identifier-Apache-2.0
23    default_applicable_licenses: ["hardware_interfaces_license"],
24}
25
26cc_defaults {
27    name: "keymint_vts_defaults",
28    defaults: [
29        "use_libaidlvintf_gtest_helper_static",
30        "VtsHalTargetTestDefaults",
31    ],
32    shared_libs: [
33        "libbinder_ndk",
34        "libcrypto",
35    ],
36    static_libs: [
37        "android.hardware.security.keymint-V1-ndk_platform",
38        "android.hardware.security.secureclock-V1-ndk_platform",
39        "libcppbor_external",
40        "libcppcose_rkp",
41        "libjsoncpp",
42        "libkeymint",
43        "libkeymint_remote_prov_support",
44        "libkeymint_support",
45    ],
46}
47
48cc_test {
49    name: "VtsAidlKeyMintTargetTest",
50    defaults: [
51        "keymint_vts_defaults",
52    ],
53    srcs: [
54        "AttestKeyTest.cpp",
55        "DeviceUniqueAttestationTest.cpp",
56        "KeyMintTest.cpp",
57    ],
58    static_libs: [
59        "libkeymint_vts_test_utils",
60    ],
61    test_suites: [
62        "general-tests",
63        "vts",
64    ],
65}
66
67cc_test_library {
68    name: "libkeymint_vts_test_utils",
69    defaults: [
70        "keymint_vts_defaults",
71    ],
72    srcs: [
73        "KeyMintAidlTestBase.cpp",
74    ],
75    export_include_dirs: [
76        ".",
77    ],
78    static_libs: [
79        "libgmock_ndk",
80    ],
81}
82
83cc_test {
84    name: "VtsHalRemotelyProvisionedComponentTargetTest",
85    defaults: [
86        "keymint_vts_defaults",
87    ],
88    srcs: [
89        "VtsRemotelyProvisionedComponentTests.cpp",
90    ],
91    static_libs: [
92        "libgmock_ndk",
93        "libkeymaster_portable",
94        "libkeymint_vts_test_utils",
95        "libpuresoftkeymasterdevice",
96    ],
97    test_config: "VtsRemotelyProvisionedComponentTests.xml",
98    test_suites: [
99        "general-tests",
100        "vts",
101    ],
102}
103