diff --git a/bp2build/build_conversion_test.go b/bp2build/build_conversion_test.go index 9f4f7c1b3..7bd311239 100644 --- a/bp2build/build_conversion_test.go +++ b/bp2build/build_conversion_test.go @@ -1035,6 +1035,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 { @@ -1044,8 +1067,6 @@ func TestModuleTypeBp2Build(t *testing.T) { } } -type bp2buildMutator = func(android.TopDownMutatorContext) - func TestAllowlistingBp2buildTargetsExplicitly(t *testing.T) { testCases := []struct { moduleTypeUnderTest string