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 | } |