From d34eb0c4a6e176ca129f66f0449bd0ba19fdff5e Mon Sep 17 00:00:00 2001 From: satayev Date: Fri, 6 Aug 2021 13:20:28 +0100 Subject: Make sure that classpath fragment contents appear in make vars. The source of truth for what jars are in BOOTCLASSPATH and SYSTEMSERVERCLASSPATH is make; adding a classpath fragment in soong with a new jar in the contents without having it declared in make is wrong (excluding test apexes). Bug: 191369843 Test: m nothing Change-Id: Ifd313776ee7ad206031244534ed3870126e4f835 --- apex/classpath_element_test.go | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'apex/classpath_element_test.go') diff --git a/apex/classpath_element_test.go b/apex/classpath_element_test.go index e2d846559..60f18bd57 100644 --- a/apex/classpath_element_test.go +++ b/apex/classpath_element_test.go @@ -159,11 +159,6 @@ func TestCreateClasspathElements(t *testing.T) { ], } - bootclasspath_fragment { - name: "non-apex-fragment", - contents: ["othersdklibrary"], - } - apex { name: "otherapex", key: "otherapex.key", @@ -213,7 +208,6 @@ func TestCreateClasspathElements(t *testing.T) { myFragment := result.Module("mybootclasspath-fragment", "android_common_apex10000") myBar := result.Module("bar", "android_common_apex10000") - nonApexFragment := result.Module("non-apex-fragment", "android_common") other := result.Module("othersdklibrary", "android_common_apex10000") otherApexLibrary := result.Module("otherapexlibrary", "android_common_apex10000") @@ -253,15 +247,6 @@ func TestCreateClasspathElements(t *testing.T) { assertElementsEquals(t, "elements", expectedElements, elements) }) - // Verify that CreateClasspathElements detects when a fragment does not have an associated apex. - t.Run("non apex fragment", func(t *testing.T) { - ctx := newCtx() - elements := java.CreateClasspathElements(ctx, []android.Module{}, []android.Module{nonApexFragment}) - android.FailIfNoMatchingErrors(t, "fragment non-apex-fragment{.*} is not part of an apex", ctx.errs) - expectedElements := java.ClasspathElements{} - assertElementsEquals(t, "elements", expectedElements, elements) - }) - // Verify that CreateClasspathElements detects when an apex has multiple fragments. t.Run("multiple fragments for same apex", func(t *testing.T) { ctx := newCtx() -- cgit v1.2.3-59-g8ed1b