diff --git a/packages/flutter_tools/lib/src/artifacts.dart b/packages/flutter_tools/lib/src/artifacts.dart index d665e5af86..3f5e6caa54 100644 --- a/packages/flutter_tools/lib/src/artifacts.dart +++ b/packages/flutter_tools/lib/src/artifacts.dart @@ -1544,17 +1544,10 @@ class CachedLocalEngineArtifacts implements Artifacts { } String _flutterTesterPath(TargetPlatform platform) { - if (_platform.isLinux) { - return _fileSystem.path.join( - localEngineInfo.targetOutPath, - _artifactToFileName(Artifact.flutterTester, _platform), - ); - } else if (_platform.isMacOS) { - return _fileSystem.path.join(localEngineInfo.targetOutPath, 'flutter_tester'); - } else if (_platform.isWindows) { - return _fileSystem.path.join(localEngineInfo.targetOutPath, 'flutter_tester.exe'); - } - throw Exception('Unsupported platform $platform.'); + return _fileSystem.path.join( + localEngineInfo.hostOutPath, + _artifactToFileName(Artifact.flutterTester, _platform), + ); } @override diff --git a/packages/flutter_tools/test/general.shard/artifacts_test.dart b/packages/flutter_tools/test/general.shard/artifacts_test.dart index 6addc3942a..396161dfe9 100644 --- a/packages/flutter_tools/test/general.shard/artifacts_test.dart +++ b/packages/flutter_tools/test/general.shard/artifacts_test.dart @@ -516,7 +516,7 @@ void main() { ); expect( artifacts.getArtifactPath(Artifact.flutterTester), - fileSystem.path.join('/out', 'android_debug_unopt', 'flutter_tester'), + fileSystem.path.join('/out', 'host_debug_unopt', 'flutter_tester'), ); expect( artifacts.getArtifactPath(Artifact.engineDartSdkPath),