diff options
author | 2022-03-21 19:34:02 +0000 | |
---|---|---|
committer | 2022-03-24 14:46:18 +0000 | |
commit | 90727f4576b8ece68c6d7f27d034c33195a70de4 (patch) | |
tree | ddbabe0f421ff0005c2a021723af05c4b495848b /android/androidmk_test.go | |
parent | b6a55c53e73e1a43aa9f79d7e759530a893e4f4c (diff) |
Allow appending artifact in dist with product name
Some modules need to have their artifacts copied to dist with the
product name appended. This CL enables that functionality in a
boolean Soong property called append_artifact_with_product.
Fixes: 224561567
Test: Unit tests and build relevant target/modules
Change-Id: I4b824d4001679cebf0a9059be2d090d33a310933
Diffstat (limited to 'android/androidmk_test.go')
-rw-r--r-- | android/androidmk_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/android/androidmk_test.go b/android/androidmk_test.go index ecfb00825..caf11f10f 100644 --- a/android/androidmk_test.go +++ b/android/androidmk_test.go @@ -148,6 +148,9 @@ func buildContextAndCustomModuleFoo(t *testing.T, bp string) (*TestContext, *cus FixtureRegisterWithContext(func(ctx RegistrationContext) { ctx.RegisterModuleType("custom", customModuleFactory) }), + FixtureModifyProductVariables(func(variables FixtureProductVariables) { + variables.DeviceProduct = proptools.StringPtr("bar") + }), FixtureWithRootAndroidBp(bp), ).RunTest(t) @@ -400,6 +403,25 @@ func TestGetDistContributions(t *testing.T) { }, }) + testHelper(t, "append-artifact-with-product", ` + custom { + name: "foo", + dist: { + targets: ["my_goal"], + append_artifact_with_product: true, + } + } +`, &distContributions{ + copiesForGoals: []*copiesForGoals{ + { + goals: "my_goal", + copies: []distCopy{ + distCopyForTest("one.out", "one_bar.out"), + }, + }, + }, + }) + testHelper(t, "dists-with-tag", ` custom { name: "foo", |