diff options
author | 2020-04-27 12:10:30 +0900 | |
---|---|---|
committer | 2020-04-27 16:33:37 +0900 | |
commit | 548640b55f732aa7e42ae9112d38e13e54988df2 (patch) | |
tree | 187e7b4de0e0b1750d52203a409bafecd0e00120 /apex/apex_test.go | |
parent | 70b5c212700d1ec6bfb518e32df8a5403ef796c1 (diff) |
enforce updatable apexes to set min_sdk_version
updatable APEXes should set min_sdk_version as well.
Bug: 152655956
Test: m
Change-Id: I8192086eb89fa958dd8ff1b731e43e24bf217ce2
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r-- | apex/apex_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go index 8807d00c4..ec5295c8b 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -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 { |