Bob Badour | 3c53823 | 2021-02-12 21:26:48 -0800 | [diff] [blame] | 1 | package { |
| 2 | // See: http://go/android-license-faq |
| 3 | // A large-scale-change added 'default_applicable_licenses' to import |
| 4 | // all of the 'license_kinds' from "frameworks_native_license" |
| 5 | // to get the below license kinds: |
| 6 | // SPDX-license-identifier-Apache-2.0 |
| 7 | default_applicable_licenses: ["frameworks_native_license"], |
| 8 | } |
| 9 | |
Stephen Crane | 2a3c250 | 2020-06-16 17:48:35 -0700 | [diff] [blame] | 10 | rust_test { |
| 11 | name: "rustBinderTest", |
| 12 | srcs: ["integration.rs"], |
| 13 | rustlibs: [ |
| 14 | "libbinder_rs", |
Janis Danisevskis | 798a09a | 2020-08-18 08:35:38 -0700 | [diff] [blame] | 15 | "libselinux_bindgen", |
Alice Ryhl | 05f5a2c | 2021-09-15 12:56:10 +0000 | [diff] [blame] | 16 | "libbinder_tokio_rs", |
| 17 | "libtokio", |
Janis Danisevskis | 798a09a | 2020-08-18 08:35:38 -0700 | [diff] [blame] | 18 | ], |
| 19 | shared_libs: [ |
| 20 | "libselinux", |
Stephen Crane | 2a3c250 | 2020-06-16 17:48:35 -0700 | [diff] [blame] | 21 | ], |
| 22 | // For the binaries to be pushed properly as specified in AndroidTest.xml, |
| 23 | // this cannot be the same as the module name. |
| 24 | stem: "rustBinderTestClientBinary", |
| 25 | test_suites: ["general-tests"], |
jahinimtiaz | 6745574 | 2023-04-06 22:14:33 +0000 | [diff] [blame^] | 26 | data: [ |
| 27 | ":rustBinderTestService", |
| 28 | ], |
Stephen Crane | 2a3c250 | 2020-06-16 17:48:35 -0700 | [diff] [blame] | 29 | } |
| 30 | |
| 31 | rust_test { |
| 32 | name: "rustBinderTestService", |
| 33 | srcs: ["integration.rs"], |
| 34 | rustlibs: [ |
| 35 | "libbinder_rs", |
| 36 | "liblibc", |
| 37 | ], |
| 38 | // For the binaries to be pushed properly as specified in AndroidTest.xml, |
| 39 | // this cannot be the same as the module name. |
| 40 | stem: "rustBinderTestServiceBinary", |
| 41 | test_harness: false, |
Stephen Crane | 2a3c250 | 2020-06-16 17:48:35 -0700 | [diff] [blame] | 42 | } |
Stephen Crane | 669deb6 | 2020-09-10 17:31:39 -0700 | [diff] [blame] | 43 | |
| 44 | cc_test { |
| 45 | name: "binderRustNdkInteropTest", |
| 46 | srcs: [ |
| 47 | "binderRustNdkInteropTest.cpp", |
| 48 | ], |
| 49 | shared_libs: [ |
| 50 | "libbinder", |
| 51 | "libbinder_ndk", |
| 52 | ], |
| 53 | static_libs: [ |
Jiyong Park | 9a9427c | 2021-08-09 09:01:15 +0900 | [diff] [blame] | 54 | "IBinderRustNdkInteropTest-ndk", |
Stephen Crane | 669deb6 | 2020-09-10 17:31:39 -0700 | [diff] [blame] | 55 | "libbinder_ndk_rust_interop", |
| 56 | ], |
| 57 | test_suites: ["general-tests"], |
| 58 | require_root: true, |
| 59 | |
| 60 | // rustBinderTestService uses a custom config |
| 61 | auto_gen_config: true, |
| 62 | } |
| 63 | |
| 64 | aidl_interface { |
| 65 | name: "IBinderRustNdkInteropTest", |
| 66 | unstable: true, |
| 67 | srcs: [ |
| 68 | "IBinderRustNdkInteropTest.aidl", |
| 69 | "IBinderRustNdkInteropTestOther.aidl", |
| 70 | ], |
| 71 | backend: { |
| 72 | ndk: { |
| 73 | enabled: true, |
| 74 | }, |
| 75 | rust: { |
| 76 | enabled: true, |
| 77 | }, |
| 78 | }, |
| 79 | } |
| 80 | |
| 81 | rust_ffi_static { |
| 82 | name: "libbinder_ndk_rust_interop", |
| 83 | crate_name: "binder_ndk_rust_interop", |
| 84 | srcs: [ |
| 85 | "ndk_rust_interop.rs", |
| 86 | ], |
| 87 | rustlibs: [ |
| 88 | "libbinder_rs", |
| 89 | "IBinderRustNdkInteropTest-rust", |
| 90 | ], |
| 91 | } |
Stephen Crane | d58bce0 | 2020-07-07 12:26:02 -0700 | [diff] [blame] | 92 | |
| 93 | cc_test { |
| 94 | name: "rustBinderSerializationTest", |
| 95 | shared_libs: [ |
| 96 | "libbinder", |
| 97 | "libbinder_ndk", |
| 98 | "libutils", |
| 99 | "libbase", |
| 100 | ], |
| 101 | static_libs: [ |
jahinimtiaz | 6745574 | 2023-04-06 22:14:33 +0000 | [diff] [blame^] | 102 | "libbinder_rs_serialization_test", |
Stephen Crane | d58bce0 | 2020-07-07 12:26:02 -0700 | [diff] [blame] | 103 | ], |
| 104 | srcs: [ |
| 105 | "serialization.cpp", |
| 106 | ], |
| 107 | auto_gen_config: true, |
| 108 | test_suites: ["general-tests"], |
| 109 | } |
| 110 | |
| 111 | rust_bindgen { |
| 112 | name: "libbinder_rs_serialization_bindgen", |
| 113 | crate_name: "binder_rs_serialization_bindgen", |
| 114 | wrapper_src: "serialization.hpp", |
| 115 | source_stem: "bindings", |
| 116 | cpp_std: "gnu++17", |
| 117 | bindgen_flags: [ |
jahinimtiaz | 6745574 | 2023-04-06 22:14:33 +0000 | [diff] [blame^] | 118 | "--allowlist-type", |
| 119 | "Transaction", |
| 120 | "--allowlist-var", |
| 121 | "TESTDATA_.*", |
Stephen Crane | d58bce0 | 2020-07-07 12:26:02 -0700 | [diff] [blame] | 122 | ], |
| 123 | |
| 124 | shared_libs: [ |
| 125 | "libbinder", |
| 126 | "libc++", |
| 127 | ], |
| 128 | } |
| 129 | |
| 130 | rust_ffi_static { |
| 131 | name: "libbinder_rs_serialization_test", |
| 132 | crate_name: "binder_rs_serialization_test", |
| 133 | srcs: [ |
| 134 | "serialization.rs", |
| 135 | ":libbinder_rs_serialization_bindgen", |
| 136 | ], |
| 137 | rustlibs: [ |
| 138 | "libbinder_rs", |
| 139 | ], |
| 140 | } |