Relax restriction on suffix of apex_set filename to include .capex
Compressed APEX files generated by the build system have the .capex extension. This CL allows us using those .capex files with their actual suffix. Bug: 197258691 Test: manual + unit test added Change-Id: I79173ef942326b48b5e659f1873d80f12b212339
This commit is contained in:
@@ -4640,6 +4640,35 @@ func TestPrebuiltFilenameOverride(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestApexSetFilenameOverride(t *testing.T) {
|
||||
testApex(t, `
|
||||
apex_set {
|
||||
name: "com.company.android.myapex",
|
||||
apex_name: "com.android.myapex",
|
||||
set: "company-myapex.apks",
|
||||
filename: "com.company.android.myapex.apex"
|
||||
}
|
||||
`).ModuleForTests("com.company.android.myapex", "android_common_com.android.myapex")
|
||||
|
||||
testApex(t, `
|
||||
apex_set {
|
||||
name: "com.company.android.myapex",
|
||||
apex_name: "com.android.myapex",
|
||||
set: "company-myapex.apks",
|
||||
filename: "com.company.android.myapex.capex"
|
||||
}
|
||||
`).ModuleForTests("com.company.android.myapex", "android_common_com.android.myapex")
|
||||
|
||||
testApexError(t, `filename should end in .apex or .capex for apex_set`, `
|
||||
apex_set {
|
||||
name: "com.company.android.myapex",
|
||||
apex_name: "com.android.myapex",
|
||||
set: "company-myapex.apks",
|
||||
filename: "some-random-suffix"
|
||||
}
|
||||
`)
|
||||
}
|
||||
|
||||
func TestPrebuiltOverrides(t *testing.T) {
|
||||
ctx := testApex(t, `
|
||||
prebuilt_apex {
|
||||
|
Reference in New Issue
Block a user