From 598f92d7048b670c209977bf12c67d2c47d056a6 Mon Sep 17 00:00:00 2001 From: Wei Li Date: Wed, 4 Jan 2023 17:12:24 -0800 Subject: Export Soong module type to LOCAL_SOONG_MODULE_TYPE to Make for SBOM generation. Bug: 266726655 Test: CI Change-Id: If5b1a77930a591b6061ca2749c9c5ad29b4491fb --- java/java_test.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'java/java_test.go') diff --git a/java/java_test.go b/java/java_test.go index 05cc23e29..68b749b6d 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -615,6 +615,13 @@ func TestPrebuilts(t *testing.T) { android.AssertPathRelativeToTopEquals(t, "baz dex jar build path", expectedDexJar, bazDexJar) ctx.ModuleForTests("qux", "android_common").Rule("Cp") + + entries := android.AndroidMkEntriesForTest(t, ctx, fooModule.Module())[0] + android.AssertStringEquals(t, "unexpected LOCAL_SOONG_MODULE_TYPE", "java_library", entries.EntryMap["LOCAL_SOONG_MODULE_TYPE"][0]) + entries = android.AndroidMkEntriesForTest(t, ctx, barModule.Module())[0] + android.AssertStringEquals(t, "unexpected LOCAL_SOONG_MODULE_TYPE", "java_import", entries.EntryMap["LOCAL_SOONG_MODULE_TYPE"][0]) + entries = android.AndroidMkEntriesForTest(t, ctx, ctx.ModuleForTests("sdklib", "android_common").Module())[0] + android.AssertStringEquals(t, "unexpected LOCAL_SOONG_MODULE_TYPE", "java_sdk_library_import", entries.EntryMap["LOCAL_SOONG_MODULE_TYPE"][0]) } func assertDeepEquals(t *testing.T, message string, expected interface{}, actual interface{}) { -- cgit v1.2.3-59-g8ed1b