bp2build: don't generate filegroups (or error) if it contains a file
with the same name. Also add capability to test for errors raised in bp2build mutators / contexts. This CL does two things to filegroups: 1) If the filegroup has only 1 source file with the same name as itself, don't generate a filegroup target. Instead, dependents will depend directly on the Bazel file target instead. 2) If the filegroup has more than 1 source file and 1 of them has the same name as itself, the bp2build mutator will error out. If bp2build on CI passes, it means that the source tree / product we're testing against does not have such a case (which seems to be true for most source trees). Either way, this will allow us to be unblocked for most of the errant filegroups (case 1) in the tree. Test: CI Test: New test cases in filegroup_conversion_test.go Fixes: 194762573 Change-Id: I830c53efc8808569afe3c5f9f08436855bcdafed
Loading
Please register or sign in to comment