diff options
| author | 2023-10-30 16:17:56 +0900 | |
|---|---|---|
| committer | 2023-10-30 16:48:36 +0900 | |
| commit | 286957df998636ccd940b9b8c88c8ebfee20d96c (patch) | |
| tree | 3788b51d26ef9e2a97fe68cbdb9a73f877447ef2 /apex/apex_test.go | |
| parent | 2cf35e7bfd3d44c71395515a6dfcea3998cb1296 (diff) | |
Rewrite how to generate apexkeys.txt
Instead of listing all apexes in the source tree, now each apex emits
its own fragment for apexkeys.txt, which is pointed by
LOCAL_APEX_KEYS_FILE. Makefile collects apexkeys.txt from installed apex
files. This is to avoid listing unrelated apexes (not installed,
testdata, unexported namespaces, etc.)
Bug: 304914238
Test: m apexkeys.txt
Test: m blueprint-tests
Change-Id: Iefbe6e486cb418955584ad1a282455307e90be95
Diffstat (limited to 'apex/apex_test.go')
| -rw-r--r-- | apex/apex_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go index e70d3af7e..97cc3cbf7 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -9078,8 +9078,8 @@ func TestApexKeysTxt(t *testing.T) { } `) - apexKeysText := ctx.SingletonForTests("apex_keys_text") - content := apexKeysText.MaybeDescription("apexkeys.txt").BuildParams.Args["content"] + myapex := ctx.ModuleForTests("myapex", "android_common_myapex") + content := myapex.Output("apexkeys.txt").BuildParams.Args["content"] ensureContains(t, content, `name="myapex.apex" public_key="vendor/foo/devkeys/testkey.avbpubkey" private_key="vendor/foo/devkeys/testkey.pem" container_certificate="vendor/foo/devkeys/test.x509.pem" container_private_key="vendor/foo/devkeys/test.pk8" partition="system" sign_tool="sign_myapex"`) } @@ -9119,10 +9119,10 @@ func TestApexKeysTxtOverrides(t *testing.T) { } `) - apexKeysText := ctx.SingletonForTests("apex_keys_text") - content := apexKeysText.MaybeDescription("apexkeys.txt").BuildParams.Args["content"] + content := ctx.ModuleForTests("myapex", "android_common_myapex").Output("apexkeys.txt").BuildParams.Args["content"] + ensureContains(t, content, `name="myapex.apex" public_key="vendor/foo/devkeys/testkey.avbpubkey" private_key="vendor/foo/devkeys/testkey.pem" container_certificate="vendor/foo/devkeys/test.x509.pem" container_private_key="vendor/foo/devkeys/test.pk8" partition="system" sign_tool="sign_myapex"`) + content = ctx.ModuleForTests("myapex_set", "android_common_myapex_set").Output("apexkeys.txt").BuildParams.Args["content"] ensureContains(t, content, `name="myapex_set.apex" public_key="PRESIGNED" private_key="PRESIGNED" container_certificate="PRESIGNED" container_private_key="PRESIGNED" partition="system"`) - ensureContains(t, content, `name="myapex.apex" public_key="PRESIGNED" private_key="PRESIGNED" container_certificate="PRESIGNED" container_private_key="PRESIGNED" partition="system"`) } func TestAllowedFiles(t *testing.T) { |