Migrate customer_testing to sharded tests. (#138659)

This will allow Dart Team to run customer tests as part of monorepo and will be a step forward to remove ad_hoc tests.

Bug: https://github.com/dart-lang/sdk/issues/51042
Bug: https://github.com/flutter/flutter/issues/115476
This commit is contained in:
godofredoc
2023-11-27 16:41:53 -08:00
committed by GitHub
parent fc203edcbf
commit fe7299d318
7 changed files with 66 additions and 28 deletions

View File

@@ -89,11 +89,12 @@ Future<Command> startCommand(String executable, List<String> arguments, {
bool Function(String)? removeLine,
void Function(String, io.Process)? outputListener,
}) async {
final String commandDescription = '${path.relative(executable, from: workingDirectory)} ${arguments.join(' ')}';
final String relativeWorkingDir = path.relative(workingDirectory ?? io.Directory.current.path);
final String commandDescription = '${path.relative(executable, from: workingDirectory)} ${arguments.join(' ')}';
print('RUNNING: cd $cyan$relativeWorkingDir$reset; $green$commandDescription$reset');
final Stopwatch time = Stopwatch()..start();
print('workingDirectory: $workingDirectory, executable: $executable, arguments: $arguments');
final io.Process process = await io.Process.start(executable, arguments,
workingDirectory: workingDirectory,
environment: environment,
@@ -160,7 +161,7 @@ Future<CommandResult> runCommand(String executable, List<String> arguments, {
void Function(String, io.Process)? outputListener,
}) async {
final String commandDescription = '${path.relative(executable, from: workingDirectory)} ${arguments.join(' ')}';
final String relativeWorkingDir = path.relative(workingDirectory ?? io.Directory.current.path);
final String relativeWorkingDir = workingDirectory ?? path.relative(io.Directory.current.path);
final Command command = await startCommand(executable, arguments,
workingDirectory: workingDirectory,