bazel: define and use small_tests

Avoids having the same list of exclusions in three places.

Change-Id: I5912139e89800eeb4b72f3b6ed11996fe95b5ee0
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63991
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Jeremy Kun <jkun@google.com>
diff --git a/.bcr/presubmit.yml b/.bcr/presubmit.yml
index 7e3d165..e51a036 100644
--- a/.bcr/presubmit.yml
+++ b/.bcr/presubmit.yml
@@ -45,13 +45,7 @@
       test_flags:
       - '--cxxopt=-std=c++17'
       test_targets:
-      - '//:all'
-      - '-//:dfa_test'
-      - '-//:exhaustive1_test'
-      - '-//:exhaustive2_test'
-      - '-//:exhaustive3_test'
-      - '-//:exhaustive_test'
-      - '-//:random_test'
+      - '//:small_tests'
       - '//python:all'
     windows_test:
       platform: windows
@@ -59,11 +53,5 @@
       test_flags:
       - '--cxxopt=/std:c++17'
       test_targets:
-      - '//:all'
-      - '-//:dfa_test'
-      - '-//:exhaustive1_test'
-      - '-//:exhaustive2_test'
-      - '-//:exhaustive3_test'
-      - '-//:exhaustive_test'
-      - '-//:random_test'
+      - '//:small_tests'
       - '//python:all'
diff --git a/.github/bazel.sh b/.github/bazel.sh
index f9f925c..6672e4f 100755
--- a/.github/bazel.sh
+++ b/.github/bazel.sh
@@ -16,13 +16,7 @@
   bazel test \
     --extra_toolchains=//python/toolchains:all \
     --compilation_mode=${compilation_mode} -- \
-    //:all \
-    -//:dfa_test \
-    -//:exhaustive1_test \
-    -//:exhaustive2_test \
-    -//:exhaustive3_test \
-    -//:exhaustive_test \
-    -//:random_test \
+    //:small_tests \
     //python:all
 done
 
diff --git a/BUILD.bazel b/BUILD.bazel
index 643d71f..aa0f20b 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -436,3 +436,24 @@
         "@google_benchmark//:benchmark_main",
     ],
 )
+
+test_suite(
+    name = "small_tests",
+    tags = ["small"],
+    tests = [
+        ":charclass_test",
+        ":compile_test",
+        ":filtered_re2_test",
+        ":mimics_pcre_test",
+        ":parse_test",
+        ":possible_match_test",
+        ":re2_arg_test",
+        ":re2_test",
+        ":regexp_test",
+        ":required_prefix_test",
+        ":search_test",
+        ":set_test",
+        ":simplify_test",
+        ":string_generator_test",
+    ],
+)