From 4482560cc73f16f09eecda42751cf2f8dc72e7de Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Fri, 17 Sep 2021 01:44:12 +0100 Subject: Consolidate the code to resolve a deapexer module dependency. It will get more logic in upcoming CLs. Add a property to DeapexerInfo for the APEX name, for use in error messages. Test: m nothing Bug: 192006406 Change-Id: I957f3df8b34543a38cde38768dac93e78132d672 --- apex/apex_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apex/apex_test.go') diff --git a/apex/apex_test.go b/apex/apex_test.go index 1f9bd5a2e..420489e68 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -4859,8 +4859,11 @@ func TestPrebuiltExportDexImplementationJars(t *testing.T) { // Make sure that dexpreopt can access dex implementation files from the prebuilt. ctx := testDexpreoptWithApexes(t, bp, "", transform) + deapexerName := deapexerModuleName("myapex") + android.AssertStringEquals(t, "APEX module name from deapexer name", "myapex", apexModuleName(deapexerName)) + // Make sure that the deapexer has the correct input APEX. - deapexer := ctx.ModuleForTests("myapex.deapexer", "android_common") + deapexer := ctx.ModuleForTests(deapexerName, "android_common") rule := deapexer.Rule("deapexer") if expected, actual := []string{"myapex-arm64.apex"}, android.NormalizePathsForTesting(rule.Implicits); !reflect.DeepEqual(expected, actual) { t.Errorf("expected: %q, found: %q", expected, actual) -- cgit v1.2.3-59-g8ed1b