Rajesh Nyamagoud | b881d51 | 2021-12-10 00:33:15 +0000 | [diff] [blame] | 1 | // Copyright 2022, 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 | |
Bob Badour | ae667ea | 2022-05-19 09:15:17 -0700 | [diff] [blame] | 15 | package { |
| 16 | // See: http://go/android-license-faq |
| 17 | // A large-scale-change added 'default_applicable_licenses' to import |
| 18 | // all of the 'license_kinds' from "system_security_license" |
| 19 | // to get the below license kinds: |
| 20 | // SPDX-license-identifier-Apache-2.0 |
| 21 | default_applicable_licenses: ["system_security_license"], |
| 22 | } |
| 23 | |
Rajesh Nyamagoud | b881d51 | 2021-12-10 00:33:15 +0000 | [diff] [blame] | 24 | rust_test { |
| 25 | name: "keystore2_client_tests", |
| 26 | defaults: [ |
| 27 | "keymint_use_latest_hal_aidl_rust", |
| 28 | "keystore2_use_latest_aidl_rust", |
| 29 | ], |
| 30 | srcs: ["keystore2_client_tests.rs"], |
| 31 | test_suites: [ |
| 32 | "general-tests", |
| 33 | ], |
| 34 | test_config: "AndroidTest.xml", |
| 35 | |
| 36 | rustlibs: [ |
| 37 | "librustutils", |
| 38 | "libkeystore2_test_utils", |
Rajesh Nyamagoud | c946cc4 | 2022-04-12 22:49:11 +0000 | [diff] [blame] | 39 | "packagemanager_aidl-rust", |
Rajesh Nyamagoud | b881d51 | 2021-12-10 00:33:15 +0000 | [diff] [blame] | 40 | "libnix", |
| 41 | "libanyhow", |
| 42 | "libbinder_rs", |
| 43 | "liblazy_static", |
| 44 | "liblibc", |
| 45 | "libserde", |
| 46 | "libthiserror", |
Rajesh Nyamagoud | c946cc4 | 2022-04-12 22:49:11 +0000 | [diff] [blame] | 47 | "libcxx", |
| 48 | "libopenssl", |
Rajesh Nyamagoud | 4d48337 | 2022-02-09 01:38:23 +0000 | [diff] [blame] | 49 | ], |
| 50 | static_libs: [ |
| 51 | "libkeystore2_ffi_test_utils", |
| 52 | "libgtest", |
| 53 | "libkeymint_vts_test_utils", |
| 54 | ], |
| 55 | shared_libs: [ |
| 56 | "libcrypto", |
Rajesh Nyamagoud | c946cc4 | 2022-04-12 22:49:11 +0000 | [diff] [blame] | 57 | "libkeymaster_portable", |
| 58 | "libkeymaster_messages", |
| 59 | "libcppbor_external", |
Rajesh Nyamagoud | 28abde6 | 2023-04-01 01:32:32 +0000 | [diff] [blame] | 60 | "libkeystore-engine", |
Rajesh Nyamagoud | a42dee6 | 2022-04-22 21:15:55 +0000 | [diff] [blame] | 61 | "libkeymint_support", |
Rajesh Nyamagoud | b881d51 | 2021-12-10 00:33:15 +0000 | [diff] [blame] | 62 | ], |
| 63 | require_root: true, |
| 64 | } |
Rajesh Nyamagoud | 4d48337 | 2022-02-09 01:38:23 +0000 | [diff] [blame] | 65 | |
| 66 | cc_library_static { |
| 67 | name: "libkeystore2_ffi_test_utils", |
| 68 | srcs: ["ffi_test_utils.cpp"], |
| 69 | defaults: [ |
| 70 | "keymint_vts_defaults", |
| 71 | "hidl_defaults", |
| 72 | ], |
| 73 | generated_headers: [ |
| 74 | "cxx-bridge-header", |
Rajesh Nyamagoud | c946cc4 | 2022-04-12 22:49:11 +0000 | [diff] [blame] | 75 | "libkeystore2_ffi_test_utils_bridge_header", |
Rajesh Nyamagoud | 4d48337 | 2022-02-09 01:38:23 +0000 | [diff] [blame] | 76 | ], |
| 77 | generated_sources: ["libkeystore2_ffi_test_utils_bridge_code"], |
| 78 | static_libs: [ |
| 79 | "libkeymint_vts_test_utils", |
| 80 | ], |
Rajesh Nyamagoud | c946cc4 | 2022-04-12 22:49:11 +0000 | [diff] [blame] | 81 | shared_libs: [ |
| 82 | "libkeymaster_portable", |
| 83 | "libkeymaster_messages", |
| 84 | "libcppbor_external", |
Rajesh Nyamagoud | 28abde6 | 2023-04-01 01:32:32 +0000 | [diff] [blame] | 85 | "libkeystore-engine", |
Rajesh Nyamagoud | c946cc4 | 2022-04-12 22:49:11 +0000 | [diff] [blame] | 86 | ], |
Rajesh Nyamagoud | 4d48337 | 2022-02-09 01:38:23 +0000 | [diff] [blame] | 87 | } |
| 88 | |
| 89 | genrule { |
| 90 | name: "libkeystore2_ffi_test_utils_bridge_code", |
| 91 | tools: ["cxxbridge"], |
| 92 | cmd: "$(location cxxbridge) $(in) >> $(out)", |
Rajesh Nyamagoud | c946cc4 | 2022-04-12 22:49:11 +0000 | [diff] [blame] | 93 | srcs: ["ffi_test_utils.rs"], |
Rajesh Nyamagoud | 4d48337 | 2022-02-09 01:38:23 +0000 | [diff] [blame] | 94 | out: ["libkeystore2_test_utils_cxx_generated.cc"], |
| 95 | } |
Rajesh Nyamagoud | c946cc4 | 2022-04-12 22:49:11 +0000 | [diff] [blame] | 96 | |
| 97 | genrule { |
| 98 | name: "libkeystore2_ffi_test_utils_bridge_header", |
| 99 | tools: ["cxxbridge"], |
| 100 | cmd: "$(location cxxbridge) $(in) --header >> $(out)", |
| 101 | srcs: ["ffi_test_utils.rs"], |
| 102 | out: ["ffi_test_utils.rs.h"], |
| 103 | } |