From b749347fa5cc9cd4018a8ebae0b6df37c2afa70e Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Wed, 28 Aug 2024 11:55:52 -0700 Subject: Make the java static_libs property configurable Bug: 362579941 Test: m nothing --no-skip-soong-tests Change-Id: Iccc93cf14753aae1adb26c6eedd00aabf1c2f6a6 --- java/sdk_library_test.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'java/sdk_library_test.go') diff --git a/java/sdk_library_test.go b/java/sdk_library_test.go index 485776b99..c345958ae 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 -- cgit v1.2.3-59-g8ed1b