diff options
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r-- | apex/apex_test.go | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go index 3e9f2468b..67bb55e0f 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -10910,6 +10910,24 @@ func TestAconfigFilesRustDeps(t *testing.T) { ], } + rust_library { + name: "liblogger", // test mock + crate_name: "logger", + srcs: ["src/lib.rs"], + apex_available: [ + "myapex", + ], + } + + rust_library { + name: "liblog_rust", // test mock + crate_name: "log_rust", + srcs: ["src/lib.rs"], + apex_available: [ + "myapex", + ], + } + rust_ffi_shared { name: "libmy_rust_library", srcs: ["src/lib.rs"], @@ -10994,14 +11012,14 @@ func TestAconfigFilesRustDeps(t *testing.T) { mod := ctx.ModuleForTests("myapex", "android_common_myapex") s := mod.Rule("apexRule").Args["copy_commands"] copyCmds := regexp.MustCompile(" *&& *").Split(s, -1) - if len(copyCmds) != 28 { + if len(copyCmds) != 32 { t.Fatalf("Expected 28 commands, got %d in:\n%s", len(copyCmds), s) } - ensureMatches(t, copyCmds[24], "^cp -f .*/aconfig_flags.pb .*/image.apex/etc$") - ensureMatches(t, copyCmds[25], "^cp -f .*/package.map .*/image.apex/etc$") - ensureMatches(t, copyCmds[26], "^cp -f .*/flag.map .*/image.apex/etc$") - ensureMatches(t, copyCmds[27], "^cp -f .*/flag.val .*/image.apex/etc$") + ensureMatches(t, copyCmds[28], "^cp -f .*/aconfig_flags.pb .*/image.apex/etc$") + ensureMatches(t, copyCmds[29], "^cp -f .*/package.map .*/image.apex/etc$") + ensureMatches(t, copyCmds[30], "^cp -f .*/flag.map .*/image.apex/etc$") + ensureMatches(t, copyCmds[31], "^cp -f .*/flag.val .*/image.apex/etc$") inputs := []string{ "my_aconfig_declarations_foo/intermediate.pb", |