summaryrefslogtreecommitdiff
path: root/apex/classpath_element_test.go
diff options
context:
space:
mode:
author satayev <satayev@google.com> 2021-08-06 13:20:28 +0100
committer satayev <satayev@google.com> 2021-08-16 12:00:25 +0100
commitd34eb0c4a6e176ca129f66f0449bd0ba19fdff5e (patch)
treed9ec7ce082ff942f98acacbbe2797c7cfacc7914 /apex/classpath_element_test.go
parentfc30cfc7ae35ac92d2e7b423b23c1bba8fa3f005 (diff)
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
Diffstat (limited to 'apex/classpath_element_test.go')
-rw-r--r--apex/classpath_element_test.go15
1 files changed, 0 insertions, 15 deletions
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()