Add rust_test with rust_aconfig_library in test mode
Using test mode in aconfig allows us to override the flag for unit testing Test: atest aconfig.test_mode.test.rust Change-Id: I890fb20fd8cf83e6033defc7093430e3a77e4de4
This commit is contained in:
@@ -160,11 +160,28 @@ rust_aconfig_library {
|
||||
}
|
||||
|
||||
rust_test {
|
||||
name: "aconfig.test.rust",
|
||||
name: "aconfig.prod_mode.test.rust",
|
||||
srcs: [
|
||||
"tests/aconfig_test.rs"
|
||||
"tests/aconfig_prod_mode_test.rs"
|
||||
],
|
||||
rustlibs: [
|
||||
"libaconfig_test_rust_library",
|
||||
],
|
||||
}
|
||||
|
||||
rust_aconfig_library {
|
||||
name: "libaconfig_test_rust_library_with_test_mode",
|
||||
crate_name: "aconfig_test_rust_library",
|
||||
aconfig_declarations: "aconfig.test.flags",
|
||||
test: true,
|
||||
}
|
||||
|
||||
rust_test {
|
||||
name: "aconfig.test_mode.test.rust",
|
||||
srcs: [
|
||||
"tests/aconfig_test_mode_test.rs"
|
||||
],
|
||||
rustlibs: [
|
||||
"libaconfig_test_rust_library_with_test_mode",
|
||||
],
|
||||
}
|
Reference in New Issue
Block a user