diff options
| author | 2023-11-02 16:56:39 -0700 | |
|---|---|---|
| committer | 2023-12-03 17:22:56 -0800 | |
| commit | f61d03d241334e355216e46fecb06a84e8626f8a (patch) | |
| tree | b0cb060a6bf37e655bd8362adc9bd8b94e4feb55 /java/lint_test.go | |
| parent | 5c1d5fb21b19d6bcc8b0f83bc68124c21b31fabc (diff) | |
Add TestContext parameter to ContentFromFileRuleForTests
The next CL will need a TestContext parameter in
ContentFromFileRuleForTests in order to retrieve the file rule contents
from the Config. Add it and update all the tests that use it in order
to simply review of the next CL.
Bug: 306029038
Test: go test ./...
Change-Id: Ia4b4c9854017ea3472fa2f8ba42cf7f72720496e
Diffstat (limited to 'java/lint_test.go')
| -rw-r--r-- | java/lint_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/java/lint_test.go b/java/lint_test.go index ec901aa70..5e6b8bcea 100644 --- a/java/lint_test.go +++ b/java/lint_test.go @@ -39,7 +39,7 @@ func TestJavaLint(t *testing.T) { foo := ctx.ModuleForTests("foo", "android_common") - sboxProto := android.RuleBuilderSboxProtoForTests(t, foo.Output("lint.sbox.textproto")) + sboxProto := android.RuleBuilderSboxProtoForTests(t, ctx, foo.Output("lint.sbox.textproto")) if !strings.Contains(*sboxProto.Commands[0].Command, "--baseline lint-baseline.xml") { t.Error("did not pass --baseline flag") } @@ -61,7 +61,7 @@ func TestJavaLintWithoutBaseline(t *testing.T) { foo := ctx.ModuleForTests("foo", "android_common") - sboxProto := android.RuleBuilderSboxProtoForTests(t, foo.Output("lint.sbox.textproto")) + sboxProto := android.RuleBuilderSboxProtoForTests(t, ctx, foo.Output("lint.sbox.textproto")) if strings.Contains(*sboxProto.Commands[0].Command, "--baseline") { t.Error("passed --baseline flag for non existent file") } @@ -108,7 +108,7 @@ func TestJavaLintUsesCorrectBpConfig(t *testing.T) { foo := ctx.ModuleForTests("foo", "android_common") - sboxProto := android.RuleBuilderSboxProtoForTests(t, foo.Output("lint.sbox.textproto")) + sboxProto := android.RuleBuilderSboxProtoForTests(t, ctx, foo.Output("lint.sbox.textproto")) if !strings.Contains(*sboxProto.Commands[0].Command, "--baseline mybaseline.xml") { t.Error("did not use the correct file for baseline") } @@ -276,7 +276,7 @@ func TestJavaLintDatabaseSelectionFull(t *testing.T) { RunTestWithBp(t, thisBp) foo := result.ModuleForTests("foo", "android_common") - sboxProto := android.RuleBuilderSboxProtoForTests(t, foo.Output("lint.sbox.textproto")) + sboxProto := android.RuleBuilderSboxProtoForTests(t, result.TestContext, foo.Output("lint.sbox.textproto")) if !strings.Contains(*sboxProto.Commands[0].Command, "/"+testCase.expected_file) { t.Error("did not use full api database for case", testCase) } |