Merge "Add unit test for parsing build files in bp2build" into main

This commit is contained in:
Christopher Parsons
2023-09-15 00:04:09 +00:00
committed by Gerrit Code Review
6 changed files with 175 additions and 55 deletions

View File

@@ -218,12 +218,12 @@ cc_library_shared {
func TestCcLibrarySharedOsSpecificSharedLib(t *testing.T) {
runCcLibrarySharedTestCase(t, Bp2buildTestCase{
Description: "cc_library_shared os-specific shared_libs",
Filesystem: map[string]string{},
StubbedBuildDefinitions: []string{"shared_dep"},
Description: "cc_library_shared os-specific shared_libs",
Filesystem: map[string]string{},
Blueprint: soongCcLibrarySharedPreamble + `
cc_library_shared {
name: "shared_dep",
bazel_module: { bp2build_available: false },
}
cc_library_shared {
name: "foo_shared",
@@ -243,20 +243,18 @@ cc_library_shared {
func TestCcLibrarySharedBaseArchOsSpecificSharedLib(t *testing.T) {
runCcLibrarySharedTestCase(t, Bp2buildTestCase{
Description: "cc_library_shared base, arch, and os-specific shared_libs",
Filesystem: map[string]string{},
StubbedBuildDefinitions: []string{"shared_dep", "shared_dep2", "shared_dep3"},
Description: "cc_library_shared base, arch, and os-specific shared_libs",
Filesystem: map[string]string{},
Blueprint: soongCcLibrarySharedPreamble + `
cc_library_shared {
name: "shared_dep",
bazel_module: { bp2build_available: false },
}
cc_library_shared {
name: "shared_dep2",
bazel_module: { bp2build_available: false },
}
cc_library_shared {
name: "shared_dep3",
bazel_module: { bp2build_available: false },
}
cc_library_shared {
name: "foo_shared",