Use one mutator for all bp2build conversion.
Each conversion required defining a separate mutator, which will each operate on _all_ modules and requires each to repeat checks whether the mutator should operator. Instead, we introduce a single mutator and modules can define a ConvertWithBp2build to implement bp2build conversion for that module. Test: bp2build.sh Bug: 183079158 Change-Id: I99d4b51f441c2903879092c5b56313d606d4338d
This commit is contained in:
@@ -55,10 +55,9 @@ func runShBinaryTestCase(t *testing.T, tc bp2buildTestCase) {
|
||||
|
||||
func TestShBinarySimple(t *testing.T) {
|
||||
runShBinaryTestCase(t, bp2buildTestCase{
|
||||
description: "sh_binary test",
|
||||
moduleTypeUnderTest: "sh_binary",
|
||||
moduleTypeUnderTestFactory: sh.ShBinaryFactory,
|
||||
moduleTypeUnderTestBp2BuildMutator: sh.ShBinaryBp2Build,
|
||||
description: "sh_binary test",
|
||||
moduleTypeUnderTest: "sh_binary",
|
||||
moduleTypeUnderTestFactory: sh.ShBinaryFactory,
|
||||
blueprint: `sh_binary {
|
||||
name: "foo",
|
||||
src: "foo.sh",
|
||||
|
Reference in New Issue
Block a user