Create a bp2build converter for ndk_headers
And add this module type to alwaysConvertList Test: go test ./bp2build Bug: 300504837 Change-Id: Ic09738ab47e7c497287b73de0f952d52aa78dd17
This commit is contained in:
@@ -5184,3 +5184,30 @@ ndk_library {
|
||||
}
|
||||
runCcLibraryTestCase(t, tc)
|
||||
}
|
||||
|
||||
func TestNdkHeadersConversion(t *testing.T) {
|
||||
tc := Bp2buildTestCase{
|
||||
Description: "ndk_headers conversion",
|
||||
ModuleTypeUnderTest: "ndk_headers",
|
||||
ModuleTypeUnderTestFactory: cc.NdkHeadersFactory,
|
||||
Blueprint: `
|
||||
ndk_headers {
|
||||
name: "libfoo_headers",
|
||||
from: "from",
|
||||
to: "to",
|
||||
srcs: ["foo.h", "foo_other.h"]
|
||||
}
|
||||
`,
|
||||
ExpectedBazelTargets: []string{
|
||||
MakeBazelTargetNoRestrictions("ndk_headers", "libfoo_headers", AttrNameToString{
|
||||
"strip_import_prefix": `"from"`,
|
||||
"import_prefix": `"to"`,
|
||||
"hdrs": `[
|
||||
"foo.h",
|
||||
"foo_other.h",
|
||||
]`,
|
||||
}),
|
||||
},
|
||||
}
|
||||
runCcLibraryTestCase(t, tc)
|
||||
}
|
||||
|
Reference in New Issue
Block a user