Minor change to mapped_file module, create utility function to verify file is readonly and map. Also, update the unit test to create temp pb file instead of writing to the test dir. Bug: 321077378 Test: atest aconfig_storage_file.test Change-Id: Id903ed458613e4aac8d2cbb1664fd8293de1a494
39 lines
886 B
Plaintext
39 lines
886 B
Plaintext
package {
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
}
|
|
|
|
rust_defaults {
|
|
name: "aconfig_storage_file.defaults",
|
|
edition: "2021",
|
|
lints: "none",
|
|
srcs: ["src/lib.rs"],
|
|
rustlibs: [
|
|
"libanyhow",
|
|
"libaconfig_storage_protos",
|
|
"libonce_cell",
|
|
"libprotobuf",
|
|
"libtempfile",
|
|
],
|
|
}
|
|
|
|
rust_library {
|
|
name: "libaconfig_storage_file",
|
|
crate_name: "aconfig_storage_file",
|
|
host_supported: true,
|
|
defaults: ["aconfig_storage_file.defaults"],
|
|
}
|
|
|
|
rust_test_host {
|
|
name: "aconfig_storage_file.test",
|
|
test_suites: ["general-tests"],
|
|
defaults: ["aconfig_storage_file.defaults"],
|
|
}
|
|
|
|
rust_protobuf {
|
|
name: "libaconfig_storage_protos",
|
|
protos: ["protos/aconfig_storage_metadata.proto"],
|
|
crate_name: "aconfig_storage_protos",
|
|
source_stem: "aconfig_storage_protos",
|
|
host_supported: true,
|
|
}
|