Add a supportedOs attribute to TestSpec to make it possible to split off tests that can only run under certain operating systems (e.g. Linux sandboxing tests can only run under Linux) into separate suites.
--
MOS_MIGRATED_REVID=102566414
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 6aa19f1..f267cf3 100644
--- a/src/test/java/com/google/devtools/build/lib/AllTests.java
+++ b/src/test/java/com/google/devtools/build/lib/AllTests.java
@@ -13,13 +13,22 @@
// limitations under the License.
package com.google.devtools.build.lib;
-import com.google.devtools.build.lib.testutil.ClasspathSuite;
+import com.google.devtools.build.lib.testutil.BlazeTestSuiteBuilder;
+import com.google.devtools.build.lib.testutil.CustomSuite;
import org.junit.runner.RunWith;
+import java.util.Set;
+
/**
- * Test suite for options parsing framework.
+ * General test suite with defaults suitable for most of our tests.
*/
-@RunWith(ClasspathSuite.class)
-public class AllTests {
+@RunWith(CustomSuite.class)
+public class AllTests extends BlazeTestSuiteBuilder {
+ public static Set<Class<?>> suite() {
+ return new AllTests()
+ .getBuilder()
+ .matchClasses(BlazeTestSuiteBuilder.TEST_SUPPORTS_CURRENT_OS)
+ .create();
+ }
}