Merge "Add logging dependencies to Rust aconfig APIs" into main am: 553bfd21d6 am: b468b6db7b

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3020143

Change-Id: I40d55ea6adf14782c30aedff3d1584c4687380d1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Ted Bauer
2024-04-01 14:11:16 +00:00
committed by Automerger Merge Worker
4 changed files with 92 additions and 6 deletions

View File

@@ -10918,6 +10918,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"],
@@ -11002,14 +11020,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",