Rename shellPath to flutterTesterBinPath. (#161189)

Closes https://github.com/flutter/flutter/issues/160462.

Maybe there are people who consider `flutter_tester` as the flutter
"shell", but this is more explicit.
This commit is contained in:
Matan Lurey
2025-01-06 16:52:45 -08:00
committed by GitHub
parent 434ca754e3
commit bb805fad1e
6 changed files with 27 additions and 26 deletions

View File

@@ -51,7 +51,7 @@ Future<void> run(List<String> args) async {
final ArgParser parser =
ArgParser()
..addOption(_kOptionPackages, help: 'The .packages file')
..addOption(_kOptionShell, help: 'The Flutter shell binary')
..addOption(_kOptionShell, help: 'The flutter_tester binary')
..addOption(_kOptionTestDirectory, help: 'Directory containing the tests')
..addOption(_kOptionSdkRoot, help: 'Path to the SDK platform files')
..addOption(_kOptionIcudtl, help: 'Path to the ICU data file')
@@ -83,9 +83,10 @@ Future<void> run(List<String> args) async {
try {
Cache.flutterRoot = tempDir.path;
final String shellPath = globals.fs.file(argResults[_kOptionShell]).resolveSymbolicLinksSync();
if (!globals.fs.isFileSync(shellPath)) {
throwToolExit('Cannot find Flutter shell at $shellPath');
final String flutterTesterBinPath =
globals.fs.file(argResults[_kOptionShell]).resolveSymbolicLinksSync();
if (!globals.fs.isFileSync(flutterTesterBinPath)) {
throwToolExit('Cannot find Flutter shell at $flutterTesterBinPath');
}
final Directory sdkRootSrc = globals.fs.directory(argResults[_kOptionSdkRoot]);
@@ -106,7 +107,7 @@ Future<void> run(List<String> args) async {
final Artifacts artifacts = globals.artifacts!;
final Link testerDestLink = globals.fs.link(artifacts.getArtifactPath(Artifact.flutterTester));
testerDestLink.parent.createSync(recursive: true);
testerDestLink.createSync(globals.fs.path.absolute(shellPath));
testerDestLink.createSync(globals.fs.path.absolute(flutterTesterBinPath));
final Directory sdkRootDest = globals.fs.directory(
artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath),