diff options
Diffstat (limited to 'java/java_test.go')
| -rw-r--r-- | java/java_test.go | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/java/java_test.go b/java/java_test.go index 3a7ed4e3f..a98ea8443 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -105,6 +105,7 @@ func testContext(config android.Config, bp string, ctx.RegisterModuleType("cc_object", android.ModuleFactoryAdaptor(cc.ObjectFactory)) ctx.RegisterModuleType("toolchain_library", android.ModuleFactoryAdaptor(cc.ToolchainLibraryFactory)) ctx.RegisterModuleType("llndk_library", android.ModuleFactoryAdaptor(cc.LlndkLibraryFactory)) + ctx.RegisterModuleType("ndk_prebuilt_shared_stl", android.ModuleFactoryAdaptor(cc.NdkPrebuiltSharedStlFactory)) ctx.PreDepsMutators(func(ctx android.RegisterMutatorsContext) { ctx.BottomUp("link", cc.LinkageMutator).Parallel() ctx.BottomUp("begin", cc.BeginMutator).Parallel() @@ -120,6 +121,10 @@ func testContext(config android.Config, bp string, "b.kt": nil, "a.jar": nil, "b.jar": nil, + "APP_NOTICE": nil, + "GENRULE_NOTICE": nil, + "LIB_NOTICE": nil, + "TOOL_NOTICE": nil, "java-res/a/a": nil, "java-res/b/b": nil, "java-res2/a": nil, @@ -134,6 +139,8 @@ func testContext(config android.Config, bp string, "api/test-removed.txt": nil, "framework/aidl/a.aidl": nil, + "prebuilts/ndk/current/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so": nil, + "prebuilts/sdk/14/public/android.jar": nil, "prebuilts/sdk/14/public/framework.aidl": nil, "prebuilts/sdk/14/system/android.jar": nil, @@ -209,7 +216,7 @@ func run(t *testing.T, ctx *android.TestContext, config android.Config) { setDexpreoptTestGlobalConfig(config, dexpreopt.GlobalConfigForTests(pathCtx)) ctx.Register() - _, errs := ctx.ParseFileList(".", []string{"Android.bp", "prebuilts/sdk/Android.bp"}) + _, errs := ctx.ParseBlueprintsFiles("Android.bp") android.FailIfErrored(t, errs) _, errs = ctx.PrepareBuildActions(config) android.FailIfErrored(t, errs) @@ -839,6 +846,19 @@ func TestExcludeFileGroupInSrcs(t *testing.T) { } } +func TestJavaLibrary(t *testing.T) { + config := testConfig(nil) + ctx := testContext(config, "", map[string][]byte{ + "libcore/Android.bp": []byte(` + java_library { + name: "core", + sdk_version: "none", + system_modules: "none", + }`), + }) + run(t, ctx, config) +} + func TestJavaSdkLibrary(t *testing.T) { ctx := testJava(t, ` droiddoc_template { @@ -997,7 +1017,7 @@ func TestPatchModule(t *testing.T) { java_library { name: "bar", srcs: ["b.java"], - no_standard_libs: true, + sdk_version: "none", system_modules: "none", patch_module: "java.base", } |
