From f6932afeae697c1ccfb0891e5afc941ff33f37df Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Fri, 26 Feb 2021 18:21:56 +0000 Subject: [PATCH] Add test to verify the deapexer rule's input apex file This will ensure that the following refactoring does not change the behavior. Bug: 181267622 Test: m nothing Change-Id: I36ae9ec9a0a7977bd394f4100c72941052d763ac --- apex/apex_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apex/apex_test.go b/apex/apex_test.go index 82fc95578..443fba371 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -4412,6 +4412,13 @@ func TestPrebuiltExportDexImplementationJars(t *testing.T) { // Make sure that dexpreopt can access dex implementation files from the prebuilt. ctx := testDexpreoptWithApexes(t, bp, "", transform) + // Make sure that the deapexer has the correct input APEX. + deapexer := ctx.ModuleForTests("myapex.deapexer", "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) + } + checkDexJarBuildPath(t, ctx, "libfoo") checkDexJarBuildPath(t, ctx, "libbar")