blob: f5b00718ee5da8abe414e063105c5779a7d8c11c [file] [log] [blame]
Bob Badour3c538232021-02-12 21:26:48 -08001package {
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 Crane2a3c2502020-06-16 17:48:35 -070010rust_test {
11 name: "rustBinderTest",
12 srcs: ["integration.rs"],
13 rustlibs: [
14 "libbinder_rs",
Janis Danisevskis798a09a2020-08-18 08:35:38 -070015 "libselinux_bindgen",
Alice Ryhl05f5a2c2021-09-15 12:56:10 +000016 "libbinder_tokio_rs",
17 "libtokio",
Janis Danisevskis798a09a2020-08-18 08:35:38 -070018 ],
19 shared_libs: [
20 "libselinux",
Stephen Crane2a3c2502020-06-16 17:48:35 -070021 ],
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"],
26}
27
28rust_test {
29 name: "rustBinderTestService",
30 srcs: ["integration.rs"],
31 rustlibs: [
32 "libbinder_rs",
33 "liblibc",
34 ],
35 // For the binaries to be pushed properly as specified in AndroidTest.xml,
36 // this cannot be the same as the module name.
37 stem: "rustBinderTestServiceBinary",
38 test_harness: false,
Jahin Imtiaze99670c2023-04-12 20:37:17 +000039 // TODO(b/164473602): Remove this setting and add the module to `data`
40 // attribute of rustBinderTest.
41 auto_gen_config: false,
42 test_suites: ["general-tests"],
Stephen Crane2a3c2502020-06-16 17:48:35 -070043}
Stephen Crane669deb62020-09-10 17:31:39 -070044
45cc_test {
46 name: "binderRustNdkInteropTest",
47 srcs: [
48 "binderRustNdkInteropTest.cpp",
49 ],
50 shared_libs: [
51 "libbinder",
52 "libbinder_ndk",
53 ],
54 static_libs: [
Jiyong Park9a9427c2021-08-09 09:01:15 +090055 "IBinderRustNdkInteropTest-ndk",
Stephen Crane669deb62020-09-10 17:31:39 -070056 "libbinder_ndk_rust_interop",
57 ],
58 test_suites: ["general-tests"],
59 require_root: true,
60
61 // rustBinderTestService uses a custom config
62 auto_gen_config: true,
63}
64
65aidl_interface {
66 name: "IBinderRustNdkInteropTest",
67 unstable: true,
68 srcs: [
69 "IBinderRustNdkInteropTest.aidl",
70 "IBinderRustNdkInteropTestOther.aidl",
71 ],
72 backend: {
73 ndk: {
74 enabled: true,
75 },
76 rust: {
77 enabled: true,
78 },
79 },
80}
81
82rust_ffi_static {
83 name: "libbinder_ndk_rust_interop",
84 crate_name: "binder_ndk_rust_interop",
85 srcs: [
86 "ndk_rust_interop.rs",
87 ],
88 rustlibs: [
89 "libbinder_rs",
90 "IBinderRustNdkInteropTest-rust",
91 ],
92}
Stephen Craned58bce02020-07-07 12:26:02 -070093
94cc_test {
95 name: "rustBinderSerializationTest",
96 shared_libs: [
97 "libbinder",
98 "libbinder_ndk",
99 "libutils",
100 "libbase",
101 ],
102 static_libs: [
Jahin Imtiaze99670c2023-04-12 20:37:17 +0000103 "libbinder_rs_serialization_test"
Stephen Craned58bce02020-07-07 12:26:02 -0700104 ],
105 srcs: [
106 "serialization.cpp",
107 ],
108 auto_gen_config: true,
109 test_suites: ["general-tests"],
110}
111
112rust_bindgen {
113 name: "libbinder_rs_serialization_bindgen",
114 crate_name: "binder_rs_serialization_bindgen",
115 wrapper_src: "serialization.hpp",
116 source_stem: "bindings",
Stephen Craned58bce02020-07-07 12:26:02 -0700117 bindgen_flags: [
Jahin Imtiaze99670c2023-04-12 20:37:17 +0000118 "--allowlist-type", "Transaction",
119 "--allowlist-var", "TESTDATA_.*",
Stephen Craned58bce02020-07-07 12:26:02 -0700120 ],
121
122 shared_libs: [
123 "libbinder",
124 "libc++",
125 ],
126}
127
128rust_ffi_static {
129 name: "libbinder_rs_serialization_test",
130 crate_name: "binder_rs_serialization_test",
131 srcs: [
132 "serialization.rs",
133 ":libbinder_rs_serialization_bindgen",
134 ],
135 rustlibs: [
136 "libbinder_rs",
137 ],
138}