Merge "Fix indexing bug when config.Arches() returns an empty array." am: 22053dcbf2 am: 029005ee20

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

Change-Id: I16798dc8a2d554c8f8562471d75227e8e807704d
This commit is contained in:
Martin Stjernholm
2021-05-22 19:28:15 +00:00
committed by Automerger Merge Worker
2 changed files with 36 additions and 12 deletions

View File

@@ -7439,6 +7439,28 @@ func TestPrebuiltStubLibDep(t *testing.T) {
}
}
func TestHostApexInHostOnlyBuild(t *testing.T) {
testApex(t, `
apex {
name: "myapex",
host_supported: true,
key: "myapex.key",
updatable: false,
payload_type: "zip",
}
apex_key {
name: "myapex.key",
public_key: "testkey.avbpubkey",
private_key: "testkey.pem",
}
`,
android.FixtureModifyConfig(func(config android.Config) {
// We may not have device targets in all builds, e.g. in
// prebuilts/build-tools/build-prebuilts.sh
config.Targets[android.Android] = []android.Target{}
}))
}
func TestMain(m *testing.M) {
os.Exit(m.Run())
}