Merge "Unit test for missing module error"
This commit is contained in:
@@ -1053,6 +1053,29 @@ func TestModuleTypeBp2Build(t *testing.T) {
|
|||||||
}`,
|
}`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Description: "depends_on_other_missing_module_error",
|
||||||
|
ModuleTypeUnderTest: "filegroup",
|
||||||
|
ModuleTypeUnderTestFactory: android.FileGroupFactory,
|
||||||
|
UnconvertedDepsMode: errorModulesUnconvertedDeps,
|
||||||
|
Blueprint: `filegroup {
|
||||||
|
name: "foobar",
|
||||||
|
srcs: [
|
||||||
|
"c",
|
||||||
|
"//other:foo",
|
||||||
|
"//other:goo",
|
||||||
|
],
|
||||||
|
bazel_module: { bp2build_available: true },
|
||||||
|
}`,
|
||||||
|
ExpectedErr: fmt.Errorf(`filegroup .:foobar depends on missing modules: //other:goo`),
|
||||||
|
Filesystem: map[string]string{"other/Android.bp": `filegroup {
|
||||||
|
name: "foo",
|
||||||
|
srcs: ["a"],
|
||||||
|
bazel_module: { bp2build_available: true },
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, testCase := range testCases {
|
for _, testCase := range testCases {
|
||||||
@@ -1062,8 +1085,6 @@ func TestModuleTypeBp2Build(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type bp2buildMutator = func(android.TopDownMutatorContext)
|
|
||||||
|
|
||||||
func TestAllowlistingBp2buildTargetsExplicitly(t *testing.T) {
|
func TestAllowlistingBp2buildTargetsExplicitly(t *testing.T) {
|
||||||
testCases := []struct {
|
testCases := []struct {
|
||||||
moduleTypeUnderTest string
|
moduleTypeUnderTest string
|
||||||
|
Reference in New Issue
Block a user