[flutter_tools] remove most globals from build system and tests (#63697)

Remove globals and testbed to simplify test cases, using the existing environment configuration. This is some pre-factoring work to make landing #63610 easier
This commit is contained in:
Jonah Williams
2020-08-13 15:00:27 -07:00
committed by GitHub
parent 32ee00849c
commit 06c3de3285
8 changed files with 408 additions and 311 deletions

View File

@@ -10,6 +10,7 @@ import 'package:flutter_tools/src/base/io.dart';
import 'package:meta/meta.dart';
import 'package:process/process.dart';
import 'common.dart';
import 'context.dart';
export 'package:process/process.dart' show ProcessManager;
@@ -199,6 +200,11 @@ abstract class FakeProcessManager implements ProcessManager {
/// This is a no-op on [FakeProcessManager.any].
void addCommand(FakeCommand command);
/// Add multiple [FakeCommand] to the current process manager.
void addCommands(Iterable<FakeCommand> commands) {
commands.forEach(addCommand);
}
/// Whether this fake has more [FakeCommand]s that are expected to run.
///
/// This is always `true` for [FakeProcessManager.any].