Jiyong Park | 75b000d | 2024-08-20 18:17:16 +0900 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 3 | } |
| 4 | |
| 5 | rust_defaults { |
| 6 | name: "libinherited_fd.defaults", |
| 7 | crate_name: "inherited_fd", |
| 8 | srcs: ["src/lib.rs"], |
| 9 | edition: "2021", |
| 10 | rustlibs: [ |
| 11 | "libnix", |
| 12 | "libonce_cell", |
| 13 | "libthiserror", |
| 14 | ], |
| 15 | } |
| 16 | |
| 17 | rust_library { |
| 18 | name: "libinherited_fd", |
| 19 | defaults: ["libinherited_fd.defaults"], |
| 20 | apex_available: [ |
| 21 | "com.android.compos", |
| 22 | "com.android.virt", |
| 23 | ], |
| 24 | } |
| 25 | |
| 26 | rust_test { |
| 27 | name: "libinherited_fd.test", |
| 28 | defaults: ["libinherited_fd.defaults"], |
| 29 | rustlibs: [ |
| 30 | "libanyhow", |
| 31 | "libtempfile", |
| 32 | ], |
| 33 | host_supported: true, |
| 34 | test_suites: ["general-tests"], |
| 35 | test_options: { |
| 36 | unit_test: true, |
| 37 | }, |
| 38 | // this is to run each test function in a separate process. |
| 39 | // note that they still run in parallel. |
| 40 | flags: [ |
| 41 | "-C panic=abort", |
| 42 | "-Z panic_abort_tests", |
| 43 | ], |
| 44 | } |