[infra] Remove use-st arg from mb and filter files for removed buidler

Since the stable test builders were removed and this experiment has
evolved there's no need for this argument in the recipe. A similar
one for the rts-ml that will follow (for mb.py)

Change-Id: Iabd3f92a64ec2277d1518a084708b9ace8c38da2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3661446
Reviewed-by: Gregory Guterman <guterman@google.com>
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
Cr-Commit-Position: refs/heads/main@{#1006670}
NOKEYCHECK=True
GitOrigin-RevId: 88eb34c4b8d989c38a7475a9f42778403b453396
diff --git a/mb.py b/mb.py
index 5b30479..0cacdac 100755
--- a/mb.py
+++ b/mb.py
@@ -186,11 +186,6 @@
                         help='whether or not to use regression test selection'
                         ' For more info about RTS, please see'
                         ' //docs/testing/regression-test-selection.md')
-      subp.add_argument('--use-st',
-                        action='store_true',
-                        default=False,
-                        help='whether or not to add filter stable tests during'
-                        ' RTS selection')
 
       # TODO(crbug.com/1060857): Remove this once swarming task templates
       # support command prefixes.
@@ -1331,7 +1326,7 @@
 
       # For more info about RTS, please see
       # //docs/testing/regression-test-selection.md
-      if self.args.use_rts or self.args.use_st:
+      if self.args.use_rts:
         self.AddFilterFileArg(target, build_dir, command)
 
       canonical_target = target.replace(':','_').replace('/','_')
@@ -1349,50 +1344,10 @@
       filter_file_path = self.PathJoin(self.rts_out_dir, filter_file)
       abs_filter_file_path = self.ToAbsPath(build_dir, filter_file_path)
 
-      self.CreateOrAppendStableTestFilter(abs_filter_file_path, build_dir,
-                                          target)
-
       if self.Exists(abs_filter_file_path):
         command.append('--test-launcher-filter-file=%s' % filter_file_path)
         self.Print('added RTS filter file to command: %s' % filter_file)
 
-  def CreateOrAppendStableTestFilter(self, abs_filter_file_path, build_dir,
-                                     target):
-    if self.args.use_st:
-      stable_filter_file = self.PathJoin(
-          self.chromium_src_dir, 'testing',
-          'buildbot', 'filters', 'stable_test_filters',
-          getattr(self.args, 'builder', None), target) + '.filter'
-      # The path to the filter file to append
-      abs_stable_filter_file = self.ToAbsPath(build_dir, stable_filter_file)
-
-      if self.Exists(abs_stable_filter_file):
-        # A stable filter exists
-        if not self.args.use_rts:
-          self.Print('RTS disabled, using stable filter')
-          dest_dir = os.path.dirname(abs_filter_file_path)
-          if not self.Exists(dest_dir):
-            os.makedirs(dest_dir)
-          shutil.copy(abs_stable_filter_file, abs_filter_file_path)
-        else:
-          # Rts is enabled and will delete ALL .filter files
-          # only rts filters generated this run should remain
-          if not self.Exists(abs_filter_file_path):
-            self.Print('No RTS filter found, using stable filter')
-            shutil.copy(abs_stable_filter_file, abs_filter_file_path)
-          else:
-            self.Print('Adding stable tests filter to RTS filter')
-            with open(abs_filter_file_path, 'a+') as select_filter_file, open(
-                abs_stable_filter_file, 'r') as stable_filter_file:
-              select_filter_file.write('\n')
-              select_filter_file.write(stable_filter_file.read())
-      else:
-        self.Print('No stable filter found at %s' % abs_stable_filter_file)
-    else:
-      self.Print('No stable filter')
-
-    return 0
-
   def PossibleRuntimeDepsPaths(self, vals, ninja_targets, isolate_map):
     """Returns a map of targets to possible .runtime_deps paths.
 
@@ -1670,7 +1625,7 @@
     if android_version_name:
       gn_args += ' android_default_version_name="%s"' % android_version_name
 
-    if self.args.use_rts or self.args.use_st:
+    if self.args.use_rts:
       gn_args += ' use_rts=true'
 
     args_gn_lines = []