| package { |
| default_applicable_licenses: ["Android-Apache-2.0"], |
| } |
| |
| rust_defaults { |
| name: "libinherited_fd.defaults", |
| crate_name: "inherited_fd", |
| srcs: ["src/lib.rs"], |
| edition: "2021", |
| rustlibs: [ |
| "libnix", |
| "libonce_cell", |
| "libthiserror", |
| ], |
| } |
| |
| rust_library { |
| name: "libinherited_fd", |
| defaults: ["libinherited_fd.defaults"], |
| apex_available: [ |
| "com.android.compos", |
| "com.android.virt", |
| ], |
| } |
| |
| rust_test { |
| name: "libinherited_fd.test", |
| defaults: ["libinherited_fd.defaults"], |
| rustlibs: [ |
| "libanyhow", |
| "libtempfile", |
| ], |
| host_supported: true, |
| test_suites: ["general-tests"], |
| test_options: { |
| unit_test: true, |
| }, |
| // this is to run each test function in a separate process. |
| // note that they still run in parallel. |
| flags: [ |
| "-C panic=abort", |
| "-Z panic_abort_tests", |
| ], |
| } |