Convert cc modules to use AndroidMkInfoProvider.
Bug: 358427516
Test: Unit tests and manually compare generated mk files.
Change-Id: I90d8ecb3580d6324ed53212d01d7c24b6e4bb700
diff --git a/cc/cc_test.go b/cc/cc_test.go
index 3f3347b..8b930e9 100644
--- a/cc/cc_test.go
+++ b/cc/cc_test.go
@@ -381,7 +381,7 @@
if !strings.HasSuffix(outputPath, "/main_test") {
t.Errorf("expected test output file to be 'main_test', but was '%s'", outputPath)
}
- entries := android.AndroidMkEntriesForTest(t, ctx, module)[0]
+ entries := android.AndroidMkInfoForTest(t, ctx, module).PrimaryInfo
if !strings.HasSuffix(entries.EntryMap["LOCAL_TEST_DATA"][0], ":test_lib.so:foo/bar/baz") {
t.Errorf("expected LOCAL_TEST_DATA to end with `:test_lib.so:foo/bar/baz`,"+
" but was '%s'", entries.EntryMap["LOCAL_TEST_DATA"][0])
@@ -409,7 +409,7 @@
ctx := prepareForCcTest.RunTestWithBp(t, bp).TestContext
module := ctx.ModuleForTests("main_test", "android_arm_armv7-a-neon").Module()
- entries := android.AndroidMkEntriesForTest(t, ctx, module)[0]
+ entries := android.AndroidMkInfoForTest(t, ctx, module).PrimaryInfo
compatEntries := entries.EntryMap["LOCAL_COMPATIBILITY_SUITE"]
if len(compatEntries) != 2 {
t.Errorf("expected two elements in LOCAL_COMPATIBILITY_SUITE. got %d", len(compatEntries))
@@ -441,7 +441,7 @@
ctx := prepareForCcTest.RunTestWithBp(t, bp).TestContext
module := ctx.ModuleForTests("main_test_lib", "android_arm_armv7-a-neon_shared").Module()
- entries := android.AndroidMkEntriesForTest(t, ctx, module)[0]
+ entries := android.AndroidMkInfoForTest(t, ctx, module).PrimaryInfo
compatEntries := entries.EntryMap["LOCAL_COMPATIBILITY_SUITE"]
if len(compatEntries) != 2 {
t.Errorf("expected two elements in LOCAL_COMPATIBILITY_SUITE. got %d", len(compatEntries))
@@ -1430,7 +1430,7 @@
if !strings.HasSuffix(outputPath, "/main_test") {
t.Errorf("expected test output file to be 'main_test', but was '%s'", outputPath)
}
- entries := android.AndroidMkEntriesForTest(t, ctx, module)[0]
+ entries := android.AndroidMkInfoForTest(t, ctx, module).PrimaryInfo
if !strings.HasSuffix(entries.EntryMap["LOCAL_TEST_DATA"][0], ":test_lib.so:foo/bar/baz") {
t.Errorf("expected LOCAL_TEST_DATA to end with `:test_lib.so:foo/bar/baz`,"+
" but was '%s'", entries.EntryMap["LOCAL_TEST_DATA"][0])