enforce updatable apexes to set min_sdk_version

updatable APEXes should set min_sdk_version as well.

Bug: 152655956
Test: m
Change-Id: I8192086eb89fa958dd8ff1b731e43e24bf217ce2
This commit is contained in:
Jooyung Han
2020-04-27 12:10:30 +09:00
parent 70b5c21270
commit 548640b55f
2 changed files with 32 additions and 2 deletions

View File

@@ -4099,6 +4099,7 @@ func TestSymlinksFromApexToSystem(t *testing.T) {
native_shared_libs: ["mylib"],
java_libs: ["myjar"],
updatable: true,
min_sdk_version: "current",
}
apex_key {
@@ -4396,6 +4397,22 @@ func testNoUpdatableJarsInBootImage(t *testing.T, errmsg, bp string, transformDe
}
}
func TestUpdatable_should_set_min_sdk_version(t *testing.T) {
testApexError(t, `"myapex" .*: updatable: updatable APEXes should set min_sdk_version`, `
apex {
name: "myapex",
key: "myapex.key",
updatable: true,
}
apex_key {
name: "myapex.key",
public_key: "testkey.avbpubkey",
private_key: "testkey.pem",
}
`)
}
func TestNoUpdatableJarsInBootImage(t *testing.T) {
bp := `
java_library {
@@ -4434,6 +4451,7 @@ func TestNoUpdatableJarsInBootImage(t *testing.T) {
key: "some-updatable-apex.key",
java_libs: ["some-updatable-apex-lib"],
updatable: true,
min_sdk_version: "current",
}
apex {
@@ -4455,6 +4473,7 @@ func TestNoUpdatableJarsInBootImage(t *testing.T) {
key: "com.android.art.something.key",
java_libs: ["some-art-lib"],
updatable: true,
min_sdk_version: "current",
}
apex_key {