[testing] Fix failure in test runner's batch compilation while deflaking tests.
All subclasses of Command must override indexedCopy.
A @subClassMustOverride annotation could have caught this problem.
Bug: https://github.com/dart-lang/sdk/issues/30175
Change-Id: I836cf58ae2233e3b2a5c7a494461e570aad5ffb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250300
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
diff --git a/pkg/test_runner/lib/src/command.dart b/pkg/test_runner/lib/src/command.dart
index 8db8dfb..07241ef 100644
--- a/pkg/test_runner/lib/src/command.dart
+++ b/pkg/test_runner/lib/src/command.dart
@@ -267,6 +267,18 @@
index: index);
@override
+ Dart2jsCompilationCommand indexedCopy(int index) => Dart2jsCompilationCommand(
+ outputFile,
+ _bootstrapDependencies,
+ executable,
+ arguments,
+ environmentOverrides,
+ useSdk: useSdk,
+ alwaysCompile: _alwaysCompile,
+ workingDirectory: workingDirectory,
+ index: index);
+
+ @override
CommandOutput createOutput(int exitCode, bool timedOut, List<int> stdout,
List<int> stderr, Duration time, bool compilationSkipped,
[int? pid = 0]) {
@@ -322,6 +334,15 @@
index: index);
@override
+ DevCompilerCompilationCommand indexedCopy(int index) =>
+ DevCompilerCompilationCommand(outputFile, _bootstrapDependencies,
+ executable, arguments, environmentOverrides,
+ compilerPath: compilerPath,
+ alwaysCompile: _alwaysCompile,
+ workingDirectory: workingDirectory,
+ index: index);
+
+ @override
CommandOutput createOutput(int exitCode, bool timedOut, List<int> stdout,
List<int> stderr, Duration time, bool compilationSkipped,
[int pid = 0]) {