more UI-as-code (#35516)
This commit is contained in:
committed by
GitHub
parent
d03aecab58
commit
df4bf453ab
@@ -71,7 +71,7 @@ Future<Process> _run({@required Device device, @required List<String> command, @
|
||||
await inDirectory(appDir, () async {
|
||||
runner = await startProcess(
|
||||
path.join(flutterDirectory.path, 'bin', 'flutter'),
|
||||
<String>['--suppress-analytics', '-d', device.deviceId] + command,
|
||||
<String>['--suppress-analytics', '-d', device.deviceId, ...command],
|
||||
isBot: false, // we just want to test the output, not have any debugging info
|
||||
);
|
||||
final StreamController<String> stdout = StreamController<String>.broadcast();
|
||||
|
||||
@@ -82,12 +82,11 @@ Future<Map<String, dynamic>> runTask(
|
||||
}
|
||||
|
||||
Future<VMIsolateRef> _connectToRunnerIsolate(Uri vmServiceUri) async {
|
||||
final List<String> pathSegments = <String>[];
|
||||
if (vmServiceUri.pathSegments.isNotEmpty) {
|
||||
final List<String> pathSegments = <String>[
|
||||
// Add authentication code.
|
||||
pathSegments.add(vmServiceUri.pathSegments[0]);
|
||||
}
|
||||
pathSegments.add('ws');
|
||||
if (vmServiceUri.pathSegments.isNotEmpty) vmServiceUri.pathSegments[0],
|
||||
'ws',
|
||||
];
|
||||
final String url = vmServiceUri.replace(scheme: 'ws', pathSegments:
|
||||
pathSegments).toString();
|
||||
final Stopwatch stopwatch = Stopwatch()..start();
|
||||
|
||||
@@ -65,12 +65,10 @@ abstract class _Benchmark {
|
||||
|
||||
Directory get directory;
|
||||
|
||||
List<String> get options {
|
||||
final List<String> result = <String>[ '--benchmark' ];
|
||||
if (watch)
|
||||
result.add('--watch');
|
||||
return result;
|
||||
}
|
||||
List<String> get options => <String>[
|
||||
'--benchmark',
|
||||
if (watch) '--watch',
|
||||
];
|
||||
|
||||
Future<double> execute(int iteration, int targetIterations) async {
|
||||
section('Analyze $title ${watch ? 'with watcher' : ''} - ${iteration + 1} / $targetIterations');
|
||||
|
||||
@@ -119,13 +119,11 @@ Future<void> saveCatalogScreenshots({
|
||||
String token, // Cloud storage authorization token.
|
||||
String prefix, // Prefix for all file names.
|
||||
}) async {
|
||||
final List<String> screenshots = <String>[];
|
||||
for (FileSystemEntity entity in directory.listSync()) {
|
||||
if (entity is File && entity.path.endsWith('.png')) {
|
||||
final File file = entity;
|
||||
screenshots.add(file.path);
|
||||
}
|
||||
}
|
||||
final List<String> screenshots = <String>[
|
||||
for (FileSystemEntity entity in directory.listSync())
|
||||
if (entity is File && entity.path.endsWith('.png'))
|
||||
entity.path,
|
||||
];
|
||||
|
||||
final List<String> largeNames = <String>[]; // Cloud storage names for the full res screenshots.
|
||||
final List<String> smallNames = <String>[]; // Likewise for the scaled down screenshots.
|
||||
|
||||
Reference in New Issue
Block a user