summaryrefslogtreecommitdiff
path: root/apex/apex_test.go
diff options
context:
space:
mode:
author Jooyung Han <jooyung@google.com> 2023-03-22 17:41:03 +0900
committer Jooyung Han <jooyung@google.com> 2023-03-22 17:53:12 +0900
commit02873da767d35a8a856385c8bf10325454964649 (patch)
tree1fd67383d0b11a3512a92a01823aabf405209f79 /apex/apex_test.go
parent52cb409e930a75fabb253ef3abd8ec6afc048d57 (diff)
apex.use_vndk_as_stable can't be used with min_sdk_version
For vendor apexes, use_vndk_as_stable: true means the apex is tied with the current VNDK version while min_sdk_version: N means the apex should work with N+ VNDK versions. Setting both properties together doesn't make sense. Bug: 274396342 Test: m nothing (soong tests) Change-Id: I00dcac43f95ce6a90b3f3273ae4611a300ea5028
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r--apex/apex_test.go20
1 files changed, 19 insertions, 1 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go
index e1e508b64..c9665a4b8 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -7880,7 +7880,6 @@ func Test_use_vndk_as_stable_shouldnt_be_used_for_updatable_vendor_apexes(t *tes
name: "myapex",
key: "myapex.key",
updatable: true,
- min_sdk_version: "current",
use_vndk_as_stable: true,
soc_specific: true,
}
@@ -7893,6 +7892,25 @@ func Test_use_vndk_as_stable_shouldnt_be_used_for_updatable_vendor_apexes(t *tes
`)
}
+func Test_use_vndk_as_stable_shouldnt_be_used_with_min_sdk_version(t *testing.T) {
+ testApexError(t, `"myapex" .*: use_vndk_as_stable: not supported when min_sdk_version is set`, `
+ apex {
+ name: "myapex",
+ key: "myapex.key",
+ updatable: false,
+ min_sdk_version: "29",
+ use_vndk_as_stable: true,
+ vendor: true,
+ }
+
+ apex_key {
+ name: "myapex.key",
+ public_key: "testkey.avbpubkey",
+ private_key: "testkey.pem",
+ }
+ `)
+}
+
func Test_use_vndk_as_stable_shouldnt_be_used_for_non_vendor_apexes(t *testing.T) {
testApexError(t, `"myapex" .*: use_vndk_as_stable: not supported for system/system_ext APEXes`, `
apex {