diff options
author | 2018-03-13 03:21:40 -0700 | |
---|---|---|
committer | 2018-03-13 03:23:45 -0700 | |
commit | d95f1bf6ecca600096465dc858e0862b6539c46c (patch) | |
tree | 4a142000f93ad3e94c35232c9e80f46e74382f4d /src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainProvider.java | |
parent | 29bdf63e882f2748bf72d52032e1b0f37cc4d068 (diff) |
Allow @Ignore on junit test classes
Currently a test class annotated with `@Ignore` will cause the test
runner to fail with
```
Exception in thread "main" java.lang.IllegalArgumentException: Top test must be a suite
at com.google.testing.junit.runner.junit4.JUnit4TestModelBuilder.get(JUnit4TestModelBuilder.java:53)
```
This change treats classes with no tests (either no @Test annotations or
@Ignore at class level) as an empty test suite. The main motivation
behind this is allowing an entire test class to be ignored (e.g. to
quickly deal with a flaky test) without having to modify the BUILD file.
This is desirable in order to reduce the likelihood that a developer
forgets to update the BUILD file when removing the `@Ignore` annotation.
This pull request overrides the previous pull request
https://github.com/bazelbuild/bazel/pull/4073
Closes #4293.
PiperOrigin-RevId: 188850828
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainProvider.java')
0 files changed, 0 insertions, 0 deletions