Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Handle cc_defaults' `shared` for cc_library_shared

Akin to testing for cc_defaults' `static`, we introduce
a `shared` sibling to
TestStaticLibrary_SystemSharedLibsStaticEmpty

Bug: 195451854
Test: TestCcLibrarySharedSystemSharedLibsSharedEmpty
Change-Id: I63cb0641d216e8c11586ecf415fa2441e31dd3e5
parent e559b1f5
Loading
Loading
Loading
Loading
+26 −2
Original line number Diff line number Diff line
@@ -496,3 +496,27 @@ cc_library_shared {
	},
	)
}

func TestCcLibrarySharedSystemSharedLibsSharedEmpty(t *testing.T) {
	runCcLibrarySharedTestCase(t, bp2buildTestCase{
		description:                "cc_library_shared system_shared_libs empty shared default",
		moduleTypeUnderTest:        "cc_library_shared",
		moduleTypeUnderTestFactory: cc.LibrarySharedFactory,
		blueprint: soongCcLibrarySharedPreamble + `
cc_defaults {
    name: "empty_defaults",
    shared: {
        system_shared_libs: [],
    },
    include_build_directory: false,
}
cc_library_shared {
    name: "empty",
    defaults: ["empty_defaults"],
}
`,
		expectedBazelTargets: []string{makeBazelTarget("cc_library_shared", "empty", attrNameToString{
			"system_dynamic_deps": "[]",
		})},
	})
}