summaryrefslogtreecommitdiff
path: root/java/systemserver_classpath_fragment_test.go
diff options
context:
space:
mode:
authorsatayev <satayev@google.com>2021-05-17 21:13:44 +0100
committerPaul Duffin <paulduffin@google.com>2021-05-18 10:37:51 +0100
commit7b182e717779d6582ffd21277ee325690648229e (patch)
tree76d1af4cbd5b3ed40ba76b24a244f11ec1414e42 /java/systemserver_classpath_fragment_test.go
parent72ede0fac5df789b054302ed4d2b4989225fc1fe (diff)
Add "contents" property to systemserverclasspath_fragment.
Similar to bcp_fragment's contents, this property lists all java library contributions made by this fragment. Bug: 180105615 Test: m nothing Merged-In: Ifb1f54d5db290fffaa31933d15207014bb72d2fb Change-Id: Ifb1f54d5db290fffaa31933d15207014bb72d2fb (cherry picked from commit 9366a053da11ba44c9d70671dfac7c294c5427d0)
Diffstat (limited to 'java/systemserver_classpath_fragment_test.go')
-rw-r--r--java/systemserver_classpath_fragment_test.go25
1 files changed, 18 insertions, 7 deletions
diff --git a/java/systemserver_classpath_fragment_test.go b/java/systemserver_classpath_fragment_test.go
index 6126d5eb1..5272f271d 100644
--- a/java/systemserver_classpath_fragment_test.go
+++ b/java/systemserver_classpath_fragment_test.go
@@ -20,13 +20,13 @@ import (
"android/soong/android"
)
-var prepareForTestWithSystemserverClasspath = android.GroupFixturePreparers(
+var prepareForTestWithSystemServerClasspath = android.GroupFixturePreparers(
PrepareForTestWithJavaDefaultModules,
)
-func TestSystemserverClasspathVariant(t *testing.T) {
+func TestPlatformSystemserverClasspathVariant(t *testing.T) {
result := android.GroupFixturePreparers(
- prepareForTestWithSystemserverClasspath,
+ prepareForTestWithSystemServerClasspath,
android.FixtureWithRootAndroidBp(`
platform_systemserverclasspath {
name: "platform-systemserverclasspath",
@@ -38,9 +38,9 @@ func TestSystemserverClasspathVariant(t *testing.T) {
android.AssertIntEquals(t, "expect 1 variant", 1, len(variants))
}
-func TestSystemserverClasspath_ClasspathFragmentPaths(t *testing.T) {
+func TestPlatformSystemserverClasspath_ClasspathFragmentPaths(t *testing.T) {
result := android.GroupFixturePreparers(
- prepareForTestWithSystemserverClasspath,
+ prepareForTestWithSystemServerClasspath,
android.FixtureWithRootAndroidBp(`
platform_systemserverclasspath {
name: "platform-systemserverclasspath",
@@ -53,9 +53,9 @@ func TestSystemserverClasspath_ClasspathFragmentPaths(t *testing.T) {
android.AssertPathRelativeToTopEquals(t, "install filepath", "out/soong/target/product/test_device/system/etc/classpaths", p.ClasspathFragmentBase.installDirPath)
}
-func TestSystemserverClasspathModule_AndroidMkEntries(t *testing.T) {
+func TestPlatformSystemserverClasspathModule_AndroidMkEntries(t *testing.T) {
preparer := android.GroupFixturePreparers(
- prepareForTestWithSystemserverClasspath,
+ prepareForTestWithSystemServerClasspath,
android.FixtureWithRootAndroidBp(`
platform_systemserverclasspath {
name: "platform-systemserverclasspath",
@@ -95,3 +95,14 @@ func TestSystemserverClasspathModule_AndroidMkEntries(t *testing.T) {
}
})
}
+
+func TestSystemserverclasspathFragmentWithoutContents(t *testing.T) {
+ prepareForTestWithSystemServerClasspath.
+ ExtendWithErrorHandler(android.FixtureExpectsAtLeastOneErrorMatchingPattern(
+ `\Qempty contents are not allowed\E`)).
+ RunTestWithBp(t, `
+ systemserverclasspath_fragment {
+ name: "systemserverclasspath-fragment",
+ }
+ `)
+}