From 0d10c3c30488991a20bc9b76804e91bff8d39649 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Mon, 1 Mar 2021 17:09:32 +0000 Subject: [PATCH] Verify the prebuilt_apex selects the correct input apex file This will ensure that the following refactoring does not change the behavior. Bug: 181267622 Test: m nothing Change-Id: Ieb9b37c2a1ef609b2d6565c54c261439a1ce7147 --- apex/apex_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apex/apex_test.go b/apex/apex_test.go index 443fba371..41f43feb1 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -4419,6 +4419,13 @@ func TestPrebuiltExportDexImplementationJars(t *testing.T) { t.Errorf("expected: %q, found: %q", expected, actual) } + // Make sure that the prebuilt_apex has the correct input APEX. + prebuiltApex := ctx.ModuleForTests("myapex", "android_common") + rule = prebuiltApex.Rule("android/soong/android.Cp") + if expected, actual := "myapex-arm64.apex", android.NormalizePathForTesting(rule.Input); !reflect.DeepEqual(expected, actual) { + t.Errorf("expected: %q, found: %q", expected, actual) + } + checkDexJarBuildPath(t, ctx, "libfoo") checkDexJarBuildPath(t, ctx, "libbar")