Integration test for FlutterTesterDevice. (#16424)

This commit is contained in:
Konstantin Scheglov
2018-04-11 08:52:17 -07:00
committed by GitHub
parent a2951a9a1f
commit cf500bf6cd
4 changed files with 113 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ enum Artifact {
engineDartBinary,
}
String _artifactToFileName(Artifact artifact) {
String _artifactToFileName(Artifact artifact, [TargetPlatform platform]) {
switch (artifact) {
case Artifact.dartIoEntriesTxt:
return 'dart_io_entries.txt';
@@ -44,6 +44,9 @@ String _artifactToFileName(Artifact artifact) {
case Artifact.genSnapshot:
return 'gen_snapshot';
case Artifact.flutterTester:
if (platform == TargetPlatform.windows_x64) {
return 'flutter_tester.exe';
}
return 'flutter_tester';
case Artifact.snapshotDart:
return 'snapshot.dart';
@@ -181,7 +184,7 @@ class CachedArtifacts extends Artifacts {
case Artifact.frontendServerSnapshotForEngineDartSdk:
final String engineArtifactsPath = cache.getArtifactDirectory('engine').path;
final String platformDirName = getNameForTargetPlatform(platform);
return fs.path.join(engineArtifactsPath, platformDirName, _artifactToFileName(artifact));
return fs.path.join(engineArtifactsPath, platformDirName, _artifactToFileName(artifact, platform));
case Artifact.engineDartSdkPath:
return dartSdkPath;
case Artifact.engineDartBinary:

View File

@@ -126,7 +126,7 @@ class FlutterTesterDevice extends Device {
}
try {
printTrace('$shellPath ${command.join(' ')}');
printTrace(command.join(' '));
_process = await processManager.start(command);
_process.stdout