diff options
author | 2024-09-06 18:51:55 +0000 | |
---|---|---|
committer | 2024-09-06 18:51:55 +0000 | |
commit | 720d25a1e21cc47a914224ac3fbc9ae87ee79574 (patch) | |
tree | 3eb2af7cd296c8d59238958efd6cc326dd9af876 /java/sdk_library_test.go | |
parent | 63abf09fd92ab7c12e08bbef5aef3e464207f9f8 (diff) | |
parent | ace2d9884a9957b3e538f171786a7a5d7392fb82 (diff) |
Merge "Make the java static_libs property configurable" into main am: 219009f606 am: ace2d9884a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3254302
Change-Id: I9e691f10c574e768392532e22f55ccafbcc3cd34
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 |