diff options
author | 2024-09-06 18:41:58 +0000 | |
---|---|---|
committer | 2024-09-06 18:41:58 +0000 | |
commit | ace2d9884a9957b3e538f171786a7a5d7392fb82 (patch) | |
tree | 8080b098dbbc7fe37407e0075ef38d1477db80ed /java/sdk_library_test.go | |
parent | 9d269b6956939b7faed39a4bb86ce06c0200f000 (diff) | |
parent | 219009f60695ba87d382f03f1de59b9f1b6170b2 (diff) |
Merge "Make the java static_libs property configurable" into main am: 219009f606
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3254302
Change-Id: I708599b3007151e4e525f5c647f79861d4968923
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'java/sdk_library_test.go')
-rw-r--r-- | java/sdk_library_test.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/java/sdk_library_test.go b/java/sdk_library_test.go index 12d5877c8..bb6331506 100644 --- a/java/sdk_library_test.go +++ b/java/sdk_library_test.go @@ -1528,7 +1528,8 @@ func TestJavaSdkLibrary_StubOnlyLibs_PassedToDroidstubs(t *testing.T) { // The foo.stubs.source should depend on bar-lib fooStubsSources := result.ModuleForTests("foo.stubs.source", "android_common").Module().(*Droidstubs) - android.AssertStringListContains(t, "foo stubs should depend on bar-lib", fooStubsSources.Javadoc.properties.Libs, "bar-lib") + eval := fooStubsSources.ConfigurableEvaluator(android.PanickingConfigAndErrorContext(result.TestContext)) + android.AssertStringListContains(t, "foo stubs should depend on bar-lib", fooStubsSources.Javadoc.properties.Libs.GetOrDefault(eval, nil), "bar-lib") } func TestJavaSdkLibrary_Scope_Libs_PassedToDroidstubs(t *testing.T) { @@ -1554,7 +1555,8 @@ func TestJavaSdkLibrary_Scope_Libs_PassedToDroidstubs(t *testing.T) { // The foo.stubs.source should depend on bar-lib fooStubsSources := result.ModuleForTests("foo.stubs.source", "android_common").Module().(*Droidstubs) - android.AssertStringListContains(t, "foo stubs should depend on bar-lib", fooStubsSources.Javadoc.properties.Libs, "bar-lib") + eval := fooStubsSources.ConfigurableEvaluator(android.PanickingConfigAndErrorContext(result.TestContext)) + android.AssertStringListContains(t, "foo stubs should depend on bar-lib", fooStubsSources.Javadoc.properties.Libs.GetOrDefault(eval, nil), "bar-lib") } func TestJavaSdkLibrary_ApiLibrary(t *testing.T) { @@ -1705,18 +1707,15 @@ func TestSdkLibraryExportableStubsLibrary(t *testing.T) { exportableSourceStubsLibraryModuleName := apiScopePublic.exportableSourceStubsLibraryModuleName("foo") // Check modules generation - topLevelModule := result.ModuleForTests(exportableStubsLibraryModuleName, "android_common") + result.ModuleForTests(exportableStubsLibraryModuleName, "android_common") result.ModuleForTests(exportableSourceStubsLibraryModuleName, "android_common") // Check static lib dependency android.AssertBoolEquals(t, "exportable top level stubs library module depends on the"+ "exportable source stubs library module", true, - CheckModuleHasDependency(t, result.TestContext, exportableStubsLibraryModuleName, - "android_common", exportableSourceStubsLibraryModuleName), + CheckModuleHasDependencyWithTag(t, result.TestContext, exportableStubsLibraryModuleName, + "android_common", staticLibTag, exportableSourceStubsLibraryModuleName), ) - android.AssertArrayString(t, "exportable source stub library is a static lib of the"+ - "top level exportable stubs library", []string{exportableSourceStubsLibraryModuleName}, - topLevelModule.Module().(*Library).properties.Static_libs) } // For java libraries depending on java_sdk_library(_import) via libs, assert that |