xref: /aosp_15_r20/system/security/keystore2/selinux/Android.bp (revision e1997b9af69e3155ead6e072d106a0077849ffba)
1// Copyright 2020, 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
15package {
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
24rust_library {
25    name: "libkeystore2_selinux",
26    crate_name: "keystore2_selinux",
27    srcs: [
28        "src/lib.rs",
29    ],
30
31    shared_libs: [
32        "libselinux",
33    ],
34
35    rustlibs: [
36        "libanyhow",
37        "liblog_rust",
38        "libselinux_bindgen",
39        "libthiserror",
40    ],
41}
42
43rust_test {
44    name: "keystore2_selinux_test",
45    srcs: [
46        "src/lib.rs",
47    ],
48    crate_name: "keystore2_selinux_test",
49    test_suites: ["general-tests"],
50    auto_gen_config: true,
51
52    shared_libs: [
53        "libselinux",
54    ],
55
56    rustlibs: [
57        "libandroid_logger",
58        "libanyhow",
59        "liblog_rust",
60        "libselinux_bindgen",
61        "libthiserror",
62    ],
63}
64
65rust_test {
66    name: "keystore2_selinux_concurrency_test",
67    srcs: [
68        "src/concurrency_test.rs",
69    ],
70    crate_name: "keystore2_selinux_concurrency_test",
71    test_suites: ["general-tests"],
72    auto_gen_config: true,
73
74    rustlibs: [
75        "libandroid_logger",
76        "libanyhow",
77        "libkeystore2_selinux",
78        "liblog_rust",
79        "libnix",
80        "libnum_cpus",
81        "libthiserror",
82    ],
83}
84