Pass pctx and ctx to NewRuleBuilder
Enable the RuleBuilder and RuleBuilderCommand methods to access the BuilderContext by passing it to NewRuleBuilder instead of RuleBuilder.Build. Test: genrule_test.go Test: rule_builder_test.go Test: m checkbuild Change-Id: I63e6597e19167393876dc2259d6f521363b7dabc
This commit is contained in:
@@ -63,13 +63,13 @@ func robolectricTestSuite(ctx SingletonContext, files map[string]InstallPaths) W
|
||||
testCasesDir := pathForInstall(ctx, BuildOs, X86, "testcases", false).ToMakePath()
|
||||
|
||||
outputFile := PathForOutput(ctx, "packaging", "robolectric-tests.zip")
|
||||
rule := NewRuleBuilder()
|
||||
rule.Command().BuiltTool(ctx, "soong_zip").
|
||||
rule := NewRuleBuilder(pctx, ctx)
|
||||
rule.Command().BuiltTool("soong_zip").
|
||||
FlagWithOutput("-o ", outputFile).
|
||||
FlagWithArg("-P ", "host/testcases").
|
||||
FlagWithArg("-C ", testCasesDir.String()).
|
||||
FlagWithRspFileInputList("-r ", installedPaths.Paths())
|
||||
rule.Build(pctx, ctx, "robolectric_tests_zip", "robolectric-tests.zip")
|
||||
rule.Build("robolectric_tests_zip", "robolectric-tests.zip")
|
||||
|
||||
return outputFile
|
||||
}
|
||||
|
Reference in New Issue
Block a user