diff --git a/bp2build/testing.go b/bp2build/testing.go index fd99ff007..f3263a1b2 100644 --- a/bp2build/testing.go +++ b/bp2build/testing.go @@ -76,10 +76,19 @@ type Bp2buildTestCase struct { Description string ModuleTypeUnderTest string ModuleTypeUnderTestFactory android.ModuleFactory - Blueprint string - ExpectedBazelTargets []string - Filesystem map[string]string - Dir string + // Text to add to the toplevel, root Android.bp file. If Dir is not set, all + // ExpectedBazelTargets are assumed to be generated by this file. + Blueprint string + // ExpectedBazelTargets compares the BazelTargets generated in `Dir` (if not empty). + // Otherwise, it checks the BazelTargets generated by `Blueprint` in the root directory. + ExpectedBazelTargets []string + Filesystem map[string]string + // Dir sets the directory which will be compared against the targets in ExpectedBazelTargets. + // This should used in conjunction with the Filesystem property to check for targets + // generated from a directory that is not the root. + // If not set, all ExpectedBazelTargets are assumed to be generated by the text in the + // Blueprint property. + Dir string // An error with a string contained within the string of the expected error ExpectedErr error UnconvertedDepsMode unconvertedDepsMode