Make bazel test suites fail without a real test, by no longer adding an empty test in the TestSuiteBuilder.
The current scenario can be bug-prone since changes to the TestSuiteBuilder code may bypass all tests, and in the absence of test failures, our tests will signal success.
RELNOTES: Make it mandatory for Java test suites in bazel codebase, to contain at least one test.
--
PiperOrigin-RevId: 146919833
MOS_MIGRATED_REVID=146919833
diff --git a/src/test/java/com/google/devtools/build/lib/AllTests.java b/src/test/java/com/google/devtools/build/lib/AllTests.java
index 78d6cc8..d3c745d 100644
--- a/src/test/java/com/google/devtools/build/lib/AllTests.java
+++ b/src/test/java/com/google/devtools/build/lib/AllTests.java
@@ -13,7 +13,7 @@
// limitations under the License.
package com.google.devtools.build.lib;
-import com.google.devtools.build.lib.testutil.BlazeTestSuiteBuilder;
+import com.google.devtools.build.lib.testutil.BazelTestSuiteBuilder;
import com.google.devtools.build.lib.testutil.CustomSuite;
import org.junit.runner.RunWith;
@@ -24,11 +24,11 @@
* General test suite with defaults suitable for most of our tests.
*/
@RunWith(CustomSuite.class)
-public class AllTests extends BlazeTestSuiteBuilder {
+public class AllTests extends BazelTestSuiteBuilder {
public static Set<Class<?>> suite() {
return new AllTests()
.getBuilder()
- .matchClasses(BlazeTestSuiteBuilder.TEST_SUPPORTS_CURRENT_OS)
+ .matchClasses(BazelTestSuiteBuilder.TEST_SUPPORTS_CURRENT_OS)
.create();
}
}