Commit 08c2e077 authored by Ben Konyi's avatar Ben Konyi

Removed special cases for '.exe'.

parent bf33eb78
...@@ -159,10 +159,6 @@ class CachedArtifacts extends Artifacts { ...@@ -159,10 +159,6 @@ class CachedArtifacts extends Artifacts {
// android_arm in profile mode because it is available on all supported host platforms. // android_arm in profile mode because it is available on all supported host platforms.
return _getAndroidArtifactPath(artifact, TargetPlatform.android_arm, BuildMode.profile); return _getAndroidArtifactPath(artifact, TargetPlatform.android_arm, BuildMode.profile);
case Artifact.flutterTester: case Artifact.flutterTester:
final String engineArtifactsPath = cache.getArtifactDirectory('engine').path;
final String platformDirName = getNameForTargetPlatform(platform);
String path = fs.path.join(engineArtifactsPath, platformDirName, _artifactToFileName(artifact));
return (platform == TargetPlatform.windows_x64) ? (path + '.exe') : path;
case Artifact.vmSnapshotData: case Artifact.vmSnapshotData:
case Artifact.isolateSnapshotData: case Artifact.isolateSnapshotData:
case Artifact.frontendServerSnapshotForEngineDartSdk: case Artifact.frontendServerSnapshotForEngineDartSdk:
...@@ -283,8 +279,6 @@ class LocalEngineArtifacts extends Artifacts { ...@@ -283,8 +279,6 @@ class LocalEngineArtifacts extends Artifacts {
return fs.path.join(engineOutPath, _artifactToFileName(Artifact.flutterTester)); return fs.path.join(engineOutPath, _artifactToFileName(Artifact.flutterTester));
} else if (getCurrentHostPlatform() == HostPlatform.darwin_x64) { } else if (getCurrentHostPlatform() == HostPlatform.darwin_x64) {
return fs.path.join(engineOutPath, 'flutter_tester'); return fs.path.join(engineOutPath, 'flutter_tester');
} else if (getCurrentHostPlatform() == HostPlatform.windows_x64) {
return fs.path.join(engineOutPath, 'flutter_tester.exe');
} }
throw new Exception('Unsupported platform $platform.'); throw new Exception('Unsupported platform $platform.');
} }
......
...@@ -11,6 +11,7 @@ import '../artifacts.dart'; ...@@ -11,6 +11,7 @@ import '../artifacts.dart';
import '../base/common.dart'; import '../base/common.dart';
import '../base/file_system.dart'; import '../base/file_system.dart';
import '../base/io.dart'; import '../base/io.dart';
import '../base/process_manager.dart';
import '../base/terminal.dart'; import '../base/terminal.dart';
import '../dart/package_map.dart'; import '../dart/package_map.dart';
import '../globals.dart'; import '../globals.dart';
...@@ -61,7 +62,7 @@ Future<int> runTests( ...@@ -61,7 +62,7 @@ Future<int> runTests(
// Configure package:test to use the Flutter engine for child processes. // Configure package:test to use the Flutter engine for child processes.
final String shellPath = artifacts.getArtifactPath(Artifact.flutterTester); final String shellPath = artifacts.getArtifactPath(Artifact.flutterTester);
if (!fs.isFileSync(shellPath)) if (!processManager.canRun(shellPath))
throwToolExit('Cannot find Flutter shell at $shellPath'); throwToolExit('Cannot find Flutter shell at $shellPath');
final InternetAddressType serverType = final InternetAddressType serverType =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment