Stephen Crane | 2a3c250 | 2020-06-16 17:48:35 -0700 | [diff] [blame] | 1 | rust_test { |
| 2 | name: "rustBinderTest", |
| 3 | srcs: ["integration.rs"], |
| 4 | rustlibs: [ |
| 5 | "libbinder_rs", |
Janis Danisevskis | 798a09a | 2020-08-18 08:35:38 -0700 | [diff] [blame] | 6 | "libselinux_bindgen", |
| 7 | ], |
| 8 | shared_libs: [ |
| 9 | "libselinux", |
Stephen Crane | 2a3c250 | 2020-06-16 17:48:35 -0700 | [diff] [blame] | 10 | ], |
| 11 | // For the binaries to be pushed properly as specified in AndroidTest.xml, |
| 12 | // this cannot be the same as the module name. |
| 13 | stem: "rustBinderTestClientBinary", |
| 14 | test_suites: ["general-tests"], |
| 15 | } |
| 16 | |
| 17 | rust_test { |
| 18 | name: "rustBinderTestService", |
| 19 | srcs: ["integration.rs"], |
| 20 | rustlibs: [ |
| 21 | "libbinder_rs", |
| 22 | "liblibc", |
| 23 | ], |
| 24 | // For the binaries to be pushed properly as specified in AndroidTest.xml, |
| 25 | // this cannot be the same as the module name. |
| 26 | stem: "rustBinderTestServiceBinary", |
| 27 | test_harness: false, |
Dan Shi | f80ad1a | 2020-08-14 12:51:32 -0700 | [diff] [blame] | 28 | // TODO(b/164473602): Remove this setting and add the module to `data` |
| 29 | // attribute of rustBinderTest. |
| 30 | auto_gen_config: false, |
| 31 | test_suites: ["general-tests"], |
Stephen Crane | 2a3c250 | 2020-06-16 17:48:35 -0700 | [diff] [blame] | 32 | } |
Stephen Crane | 669deb6 | 2020-09-10 17:31:39 -0700 | [diff] [blame] | 33 | |
| 34 | cc_test { |
| 35 | name: "binderRustNdkInteropTest", |
| 36 | srcs: [ |
| 37 | "binderRustNdkInteropTest.cpp", |
| 38 | ], |
| 39 | shared_libs: [ |
| 40 | "libbinder", |
| 41 | "libbinder_ndk", |
| 42 | ], |
| 43 | static_libs: [ |
| 44 | "IBinderRustNdkInteropTest-ndk_platform", |
| 45 | "libbinder_ndk_rust_interop", |
| 46 | ], |
| 47 | test_suites: ["general-tests"], |
| 48 | require_root: true, |
| 49 | |
| 50 | // rustBinderTestService uses a custom config |
| 51 | auto_gen_config: true, |
| 52 | } |
| 53 | |
| 54 | aidl_interface { |
| 55 | name: "IBinderRustNdkInteropTest", |
| 56 | unstable: true, |
| 57 | srcs: [ |
| 58 | "IBinderRustNdkInteropTest.aidl", |
| 59 | "IBinderRustNdkInteropTestOther.aidl", |
| 60 | ], |
| 61 | backend: { |
| 62 | ndk: { |
| 63 | enabled: true, |
| 64 | }, |
| 65 | rust: { |
| 66 | enabled: true, |
| 67 | }, |
| 68 | }, |
| 69 | } |
| 70 | |
| 71 | rust_ffi_static { |
| 72 | name: "libbinder_ndk_rust_interop", |
| 73 | crate_name: "binder_ndk_rust_interop", |
| 74 | srcs: [ |
| 75 | "ndk_rust_interop.rs", |
| 76 | ], |
| 77 | rustlibs: [ |
| 78 | "libbinder_rs", |
| 79 | "IBinderRustNdkInteropTest-rust", |
| 80 | ], |
| 81 | } |
Stephen Crane | d58bce0 | 2020-07-07 12:26:02 -0700 | [diff] [blame^] | 82 | |
| 83 | cc_test { |
| 84 | name: "rustBinderSerializationTest", |
| 85 | shared_libs: [ |
| 86 | "libbinder", |
| 87 | "libbinder_ndk", |
| 88 | "libutils", |
| 89 | "libbase", |
| 90 | ], |
| 91 | static_libs: [ |
| 92 | "libbinder_rs_serialization_test" |
| 93 | ], |
| 94 | srcs: [ |
| 95 | "serialization.cpp", |
| 96 | ], |
| 97 | auto_gen_config: true, |
| 98 | test_suites: ["general-tests"], |
| 99 | } |
| 100 | |
| 101 | rust_bindgen { |
| 102 | name: "libbinder_rs_serialization_bindgen", |
| 103 | crate_name: "binder_rs_serialization_bindgen", |
| 104 | wrapper_src: "serialization.hpp", |
| 105 | source_stem: "bindings", |
| 106 | cpp_std: "gnu++17", |
| 107 | bindgen_flags: [ |
| 108 | "--whitelist-type", "Transaction", |
| 109 | "--whitelist-var", "TESTDATA_.*", |
| 110 | ], |
| 111 | |
| 112 | shared_libs: [ |
| 113 | "libbinder", |
| 114 | "libc++", |
| 115 | ], |
| 116 | } |
| 117 | |
| 118 | rust_ffi_static { |
| 119 | name: "libbinder_rs_serialization_test", |
| 120 | crate_name: "binder_rs_serialization_test", |
| 121 | srcs: [ |
| 122 | "serialization.rs", |
| 123 | ":libbinder_rs_serialization_bindgen", |
| 124 | ], |
| 125 | rustlibs: [ |
| 126 | "libbinder_rs", |
| 127 | ], |
| 128 | } |