diff options
Diffstat (limited to 'java/lint_test.go')
| -rw-r--r-- | java/lint_test.go | 91 |
1 files changed, 46 insertions, 45 deletions
diff --git a/java/lint_test.go b/java/lint_test.go index 62450d573..1ab416c9e 100644 --- a/java/lint_test.go +++ b/java/lint_test.go @@ -174,51 +174,52 @@ func TestJavaLintBypassUpdatableChecks(t *testing.T) { } } -func TestJavaLintStrictUpdatabilityLinting(t *testing.T) { - bp := ` - java_library { - name: "foo", - srcs: [ - "a.java", - ], - static_libs: ["bar"], - min_sdk_version: "29", - sdk_version: "current", - lint: { - strict_updatability_linting: true, - }, - } - - java_library { - name: "bar", - srcs: [ - "a.java", - ], - min_sdk_version: "29", - sdk_version: "current", - } - ` - fs := android.MockFS{ - "lint-baseline.xml": nil, - } - - result := android.GroupFixturePreparers(PrepareForTestWithJavaDefaultModules, fs.AddToFixture()). - RunTestWithBp(t, bp) - - foo := result.ModuleForTests("foo", "android_common") - sboxProto := android.RuleBuilderSboxProtoForTests(t, foo.Output("lint.sbox.textproto")) - if !strings.Contains(*sboxProto.Commands[0].Command, - "--baseline lint-baseline.xml --disallowed_issues NewApi") { - t.Error("did not restrict baselining NewApi") - } - - bar := result.ModuleForTests("bar", "android_common") - sboxProto = android.RuleBuilderSboxProtoForTests(t, bar.Output("lint.sbox.textproto")) - if !strings.Contains(*sboxProto.Commands[0].Command, - "--baseline lint-baseline.xml --disallowed_issues NewApi") { - t.Error("did not restrict baselining NewApi") - } -} +// TODO(b/193460475): Re-enable this test +//func TestJavaLintStrictUpdatabilityLinting(t *testing.T) { +// bp := ` +// java_library { +// name: "foo", +// srcs: [ +// "a.java", +// ], +// static_libs: ["bar"], +// min_sdk_version: "29", +// sdk_version: "current", +// lint: { +// strict_updatability_linting: true, +// }, +// } +// +// java_library { +// name: "bar", +// srcs: [ +// "a.java", +// ], +// min_sdk_version: "29", +// sdk_version: "current", +// } +// ` +// fs := android.MockFS{ +// "lint-baseline.xml": nil, +// } +// +// result := android.GroupFixturePreparers(PrepareForTestWithJavaDefaultModules, fs.AddToFixture()). +// RunTestWithBp(t, bp) +// +// foo := result.ModuleForTests("foo", "android_common") +// sboxProto := android.RuleBuilderSboxProtoForTests(t, foo.Output("lint.sbox.textproto")) +// if !strings.Contains(*sboxProto.Commands[0].Command, +// "--baseline lint-baseline.xml --disallowed_issues NewApi") { +// t.Error("did not restrict baselining NewApi") +// } +// +// bar := result.ModuleForTests("bar", "android_common") +// sboxProto = android.RuleBuilderSboxProtoForTests(t, bar.Output("lint.sbox.textproto")) +// if !strings.Contains(*sboxProto.Commands[0].Command, +// "--baseline lint-baseline.xml --disallowed_issues NewApi") { +// t.Error("did not restrict baselining NewApi") +// } +//} func TestJavaLintDatabaseSelectionFull(t *testing.T) { testCases := []string{ |