[test] Remove buildbot progress reporter and step-name option

The buildbot progress reporter is no longer used by anything
in our CI setup. The step-name option was only used by this
progress reporter.

Bug: https://github.com/dart-lang/sdk/issues/33078
Change-Id: Ibbee189eb08c91c9306b349b3a09a781695f095b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356800
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
diff --git a/pkg/test_runner/lib/src/command_output.dart b/pkg/test_runner/lib/src/command_output.dart
index 6e1abb7..0193cdd 100644
--- a/pkg/test_runner/lib/src/command_output.dart
+++ b/pkg/test_runner/lib/src/command_output.dart
@@ -429,9 +429,7 @@
 
     // Show the events unless the above error was sufficient.
     // TODO(rnystrom): Let users enable or disable this explicitly?
-    if (errorShown &&
-        progress != Progress.buildbot &&
-        progress != Progress.verbose) {
+    if (errorShown && progress != Progress.verbose) {
       return;
     }
 
diff --git a/pkg/test_runner/lib/src/configuration.dart b/pkg/test_runner/lib/src/configuration.dart
index 2528118..fa11037 100644
--- a/pkg/test_runner/lib/src/configuration.dart
+++ b/pkg/test_runner/lib/src/configuration.dart
@@ -60,7 +60,6 @@
       this.taskCount = 1,
       this.shardCount = 1,
       this.shard = 1,
-      this.stepName,
       this.testServerPort = 0,
       this.testServerCrossOriginPort = 0,
       this.testDriverErrorPort = 0,
@@ -145,7 +144,6 @@
   final int shardCount;
   final int shard;
   final int repeat;
-  final String? stepName;
 
   final int testServerPort;
   final int testServerCrossOriginPort;
@@ -565,12 +563,11 @@
   static const verbose = Progress._('verbose');
   static const silent = Progress._('silent');
   static const status = Progress._('status');
-  static const buildbot = Progress._('buildbot');
 
   static final List<String> names = _all.keys.toList();
 
   static final _all = Map<String, Progress>.fromIterable(
-      [compact, color, line, verbose, silent, status, buildbot],
+      [compact, color, line, verbose, silent, status],
       key: (progress) => (progress as Progress).name);
 
   static Progress find(String name) {
diff --git a/pkg/test_runner/lib/src/options.dart b/pkg/test_runner/lib/src/options.dart
index 382281f..cc534ca 100644
--- a/pkg/test_runner/lib/src/options.dart
+++ b/pkg/test_runner/lib/src/options.dart
@@ -187,11 +187,7 @@
         help: '''Progress indication mode.
 
 Allowed values are:
-compact, color, line, verbose, silent, status, buildbot''')
-    ..addOption('step-name',
-        aliases: ['step_name'],
-        hide: true,
-        help: 'Step name for use by -pbuildbot.')
+compact, color, line, verbose, silent, status''')
     ..addFlag('report',
         hide: true,
         help: 'Print a summary report of the number of tests, by expectation.')
@@ -405,7 +401,6 @@
     'shard',
     'shards',
     'silent-failures',
-    'step-name',
     'tasks',
     'tests',
     'time',
@@ -613,10 +608,7 @@
       data['report'] = true;
     }
 
-    // Use verbose progress indication for verbose output unless buildbot
-    // progress indication is requested.
-    if ((data['verbose'] as bool) &&
-        (data['progress'] as String?) != 'buildbot') {
+    if (data['verbose'] as bool) {
       data['progress'] = 'verbose';
     }
 
@@ -681,7 +673,6 @@
           taskCount: int.parse(data["tasks"] as String),
           shardCount: int.parse(data["shards"] as String),
           shard: int.parse(data["shard"] as String),
-          stepName: data["step-name"] as String?,
           testServerPort: int.parse(data['test-server-port'] as String),
           testServerCrossOriginPort:
               int.parse(data['test-server-cross-origin-port'] as String),
diff --git a/pkg/test_runner/lib/src/test_configurations.dart b/pkg/test_runner/lib/src/test_configurations.dart
index 4981d3f..f684527 100644
--- a/pkg/test_runner/lib/src/test_configurations.dart
+++ b/pkg/test_runner/lib/src/test_configurations.dart
@@ -58,7 +58,6 @@
   var firstConf = configurations[0];
   var maxProcesses = firstConf.taskCount;
   var progress = firstConf.progress;
-  BuildbotProgressIndicator.stepName = firstConf.stepName;
   var verbose = firstConf.isVerbose;
   var printTiming = firstConf.printTiming;
   var listTests = firstConf.listTests;
diff --git a/pkg/test_runner/lib/src/test_progress.dart b/pkg/test_runner/lib/src/test_progress.dart
index 367242c..2fad4df 100644
--- a/pkg/test_runner/lib/src/test_progress.dart
+++ b/pkg/test_runner/lib/src/test_progress.dart
@@ -433,8 +433,6 @@
         return LineProgressIndicator(startTime);
       case Progress.status:
         return null;
-      case Progress.buildbot:
-        return BuildbotProgressIndicator(startTime);
     }
 
     throw "unreachable";
@@ -507,32 +505,6 @@
   }
 }
 
-class BuildbotProgressIndicator extends ProgressIndicator {
-  static String? stepName;
-
-  BuildbotProgressIndicator(super.startTime);
-
-  @override
-  void _printDoneProgress(TestCase test) {
-    var status = 'pass';
-    if (test.unexpectedOutput) {
-      status = 'fail';
-    }
-    var percent = ((_completedTests / _foundTests) * 100).toInt().toString();
-    Terminal.print(
-        'Done ${test.configurationString} ${test.displayName}: $status');
-    Terminal.print('@@@STEP_CLEAR@@@');
-    Terminal.print('@@@STEP_TEXT@ $percent% +$_passedTests -$_failedTests @@@');
-  }
-
-  @override
-  void allDone() {
-    if (_failedTests == 0) return;
-    Terminal.print('@@@STEP_FAILURE@@@');
-    if (stepName != null) Terminal.print('@@@BUILD_STEP $stepName failures@@@');
-  }
-}
-
 String _timeString(Duration duration) {
   var min = duration.inMinutes;
   var sec = duration.inSeconds % 60;