Skip to content

Commit bd25ab0

Browse files
author
Matteo Crippa
committed
Merge branch 'master' into fix/simulator_url_issue
* master: (76 commits) Roll engine to 4893b07 (flutter#20160) Add tiles_scroll_perf__timeline_summary to devicelab (flutter#20105) Support touch in AndroidViewController. (flutter#19907) reduce the number of runs on the analyze benchmakr (flutter#20155) Revert "Reduce noise on the memory benchmarks" (flutter#20158) Add pub cache, artifacts, pkgs to Cirrus cache (flutter#20080) Reduce noise on the memory benchmarks (flutter#19630) remove const (flutter#20151) Support customizing standard accessibility action hints on Android. (flutter#19665) Fix latent type error in Flutter manifest (flutter#20143) Run macOS builds only if analyze task passed (flutter#20119) Fix issues found running tests //mobile/flutter/tests/app:basic_runner_test_* during a google3 roll. Move async from member access to construction (flutter#20035) re-re-enable lint unnecessary_const (flutter#20103) Remove SHARD env that was overriding matrix (flutter#20134) Der Datumsauswahldialog spricht jetzt deutsch (flutter#20115) Roll engine to a76054f (1 commit) Roll engine to 04aa0d4 (1 commit) Roll engine to 6929326 Roll engine to de5f535 ...
2 parents a62a1e9 + 9e83212 commit bd25ab0

File tree

171 files changed

+4854
-1484
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+4854
-1484
lines changed

.cirrus.yml

Lines changed: 45 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ task:
77
PATH: "$CIRRUS_WORKING_DIR/bin:$CIRRUS_WORKING_DIR/bin/cache/dart-sdk/bin:$PATH"
88

99
git_fetch_script: git fetch origin
10+
pub_cache:
11+
folder: $HOME/.pub-cache
12+
fingerprint_script: echo $OS; grep -r --include=pubspec.yaml 'PUBSPEC CHECKSUM' "$CIRRUS_WORKING_DIR"
13+
flutter_pkg_cache:
14+
folder: bin/cache/pkg
15+
fingerprint_script: echo $OS; cat bin/internal/engine.version
16+
artifacts_cache:
17+
folder: bin/cache/artifacts
18+
fingerprint_script: echo $OS; cat bin/internal/engine.version
1019
setup_script: |
1120
echo "SDK directory is: $PWD"
1221
./bin/flutter --version
@@ -46,65 +55,64 @@ task:
4655
memory: 8G
4756

4857
task:
49-
name: tests-windows
50-
env:
51-
SHARD: tests
52-
windows_container:
53-
image: cirrusci/windowsservercore:2016
54-
os_version: 2016
55-
cpu: 4
56-
env:
57-
CIRRUS_WORKING_DIR: "C:\\Windows\\Temp\\flutter sdk"
58-
git_fetch_script: git fetch origin
59-
setup_script:
60-
- bin\flutter.bat config --no-analytics
61-
- bin\flutter.bat update-packages
62-
- git fetch origin master
63-
test_all_script:
64-
- bin\cache\dart-sdk\bin\dart.exe -c dev\bots\test.dart
65-
66-
task:
67-
name: tool_tests-windows
68-
env:
69-
SHARD: tool_tests
7058
windows_container:
7159
image: cirrusci/windowsservercore:2016
7260
os_version: 2016
7361
cpu: 4
7462
env:
7563
CIRRUS_WORKING_DIR: "C:\\Windows\\Temp\\flutter sdk"
7664
git_fetch_script: git fetch origin
65+
pub_cache:
66+
folder: $APPDATA\Pub\Cache
67+
fingerprint_script:
68+
- ps: $Env:OS; Get-ChildItem -Path "$Env:CIRRUS_WORKING_DIR" pubspec.yaml -Recurse | Select-String -Pattern "PUBSPEC CHECKSUM" -SimpleMatch
69+
flutter_pkg_cache:
70+
folder: bin\cache\pkg
71+
fingerprint_script: echo %OS% & type bin\internal\engine.version
72+
artifacts_cache:
73+
folder: bin\cache\artifacts
74+
fingerprint_script: echo %OS% & type bin\internal\engine.version
7775
setup_script:
7876
- bin\flutter.bat config --no-analytics
7977
- bin\flutter.bat update-packages
8078
- git fetch origin master
8179
test_all_script:
8280
- bin\cache\dart-sdk\bin\dart.exe -c dev\bots\test.dart
81+
matrix:
82+
- name: tests-windows
83+
env:
84+
SHARD: tests
85+
- name: tool_tests-windows
86+
env:
87+
SHARD: tool_tests
8388

8489
task:
85-
name: tests-macos
86-
env:
87-
SHARD: tests
90+
depends_on:
91+
- analyze
8892
osx_instance:
8993
image: high-sierra-xcode-9.4.1
90-
git_fetch_script: git fetch origin
91-
setup_script:
92-
- bin/flutter config --no-analytics
93-
- bin/flutter update-packages
94-
test_all_script: |
95-
ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976
96-
bin/cache/dart-sdk/bin/dart -c dev/bots/test.dart
97-
98-
task:
99-
name: tool_tests-macos
10094
env:
101-
SHARD: tool_tests
102-
osx_instance:
103-
image: high-sierra-xcode-9.4.1
95+
CIRRUS_WORKING_DIR: "/tmp/flutter sdk"
10496
git_fetch_script: git fetch origin
97+
pub_cache:
98+
folder: $HOME/.pub-cache
99+
fingerprint_script: echo $OS; grep -r --include=pubspec.yaml 'PUBSPEC CHECKSUM' "$CIRRUS_WORKING_DIR"
100+
flutter_pkg_cache:
101+
folder: bin/cache/pkg
102+
fingerprint_script: echo $OS; cat bin/internal/engine.version
103+
artifacts_cache:
104+
folder: bin/cache/artifacts
105+
fingerprint_script: echo $OS; cat bin/internal/engine.version
105106
setup_script:
106107
- bin/flutter config --no-analytics
107108
- bin/flutter update-packages
108109
test_all_script: |
109110
ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976
110111
bin/cache/dart-sdk/bin/dart -c dev/bots/test.dart
112+
matrix:
113+
- name: tests-macos
114+
env:
115+
SHARD: tests
116+
- name: tool_tests-macos
117+
env:
118+
SHARD: tool_tests

.coveralls.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

analysis_options.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ analyzer:
2727
errors:
2828
# treat missing required parameters as a warning (not a hint)
2929
missing_required_param: warning
30+
# TODO: https://github.com/flutter/flutter/issues/20114
3031
# treat missing returns as a warning (not a hint)
31-
missing_return: warning
32+
missing_return: ignore
3233
# allow having TODOs in the code
3334
todo: ignore
3435
exclude:

bin/internal/engine.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6f7bdc9fabef810b14577deef5cf330029fd290e
1+
4893b0760df08cecd8ee97bdf03856c296a6df14

bin/internal/update_dart_sdk.ps1

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,15 @@ if (Test-Path $dartSdkPath) {
4343
}
4444
New-Item $dartSdkPath -force -type directory | Out-Null
4545
$dartSdkZip = "$cachePath\$dartZipName"
46-
Import-Module BitsTransfer
47-
Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
46+
47+
Try {
48+
Import-Module BitsTransfer
49+
Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
50+
}
51+
Catch {
52+
Write-Host "Downloading the Dart SDK using the BITS service failed, retrying with WebRequest..."
53+
Invoke-WebRequest -Uri $dartSdkUrl -OutFile $dartSdkZip
54+
}
4855

4956
Write-Host "Unzipping Dart SDK..."
5057
If (Get-Command 7z -errorAction SilentlyContinue) {

dev/automated_tests/test_smoke_test/fail_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ void main() {
1111
test('test smoke test -- this test SHOULD FAIL', () async {
1212
expect(false, isTrue);
1313
});
14-
}
14+
}

dev/automated_tests/test_smoke_test/pass_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ void main() {
1111
test('test smoke test -- this test should pass', () async {
1212
expect(true, isTrue);
1313
});
14-
}
14+
}

dev/bots/docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if [ -d "$FLUTTER_PUB_CACHE" ]; then
2222
fi
2323

2424
# Install dartdoc.
25-
bin/cache/dart-sdk/bin/pub global activate dartdoc 0.20.1
25+
bin/cache/dart-sdk/bin/pub global activate dartdoc 0.20.2
2626

2727
# This script generates a unified doc set, and creates
2828
# a custom index.html, placing everything into dev/docs/doc.

dev/bots/test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,18 @@ Future<Null> _checkForTrailingSpaces() async {
128128
? Platform.environment['TEST_COMMIT_RANGE']
129129
: await _getCommitRange();
130130
final List<String> fileTypes = <String>[
131-
'*.dart', '*.cxx', '*.cpp', '*.cc', '*.c', '*.C', '*.h', '*.java', '*.mm', '*.m', '.yml',
131+
'*.dart', '*.cxx', '*.cpp', '*.cc', '*.c', '*.C', '*.h', '*.java', '*.mm', '*.m', '*.yml',
132132
];
133133
final EvalResult changedFilesResult = await _evalCommand(
134134
'git', <String>['diff', '-U0', '--no-color', '--name-only', commitRange, '--'] + fileTypes,
135135
workingDirectory: flutterRoot,
136136
);
137137
if (changedFilesResult.stdout == null) {
138-
print('No Results for whitespace check.');
138+
print('No files found that need to be checked for trailing whitespace.');
139139
return;
140140
}
141141
// Only include files that actually exist, so that we don't try and grep for
142-
// nonexistent files (can occur when files are deleted or moved).
142+
// nonexistent files, which can occur when files are deleted or moved.
143143
final List<String> changedFiles = changedFilesResult.stdout.split('\n').where((String filename) {
144144
return new File(filename).existsSync();
145145
}).toList();
@@ -148,7 +148,7 @@ Future<Null> _checkForTrailingSpaces() async {
148148
<String>[
149149
'--line-number',
150150
'--extended-regexp',
151-
r'[[:space:]]+$',
151+
r'[[:blank:]]$',
152152
] + changedFiles,
153153
workingDirectory: flutterRoot,
154154
failureMessage: '${red}Whitespace detected at the end of source code lines.$reset\nPlease remove:',

dev/devicelab/README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,18 @@ You must set the `ANDROID_HOME` environment variable to run tests on Android. If
106106
you have a local build of the Flutter engine, then you have a copy of the
107107
Android SDK at `.../engine/src/third_party/android_tools/sdk`.
108108

109+
You can find where your Android SDK is using `flutter doctor`.
110+
111+
## Running all tests
112+
113+
To run all tests defined in `manifest.yaml`, use option `-a` (`--all`):
114+
115+
```sh
116+
dart bin/run.dart -a
117+
```
118+
119+
## Running specific tests
120+
109121
To run a test, use option `-t` (`--task`):
110122

111123
```sh
@@ -127,20 +139,15 @@ To run multiple tests, repeat option `-t` (`--task`) multiple times:
127139
dart bin/run.dart -t test1 -t test2 -t test3
128140
```
129141

130-
To run all tests defined in `manifest.yaml`, use option `-a` (`--all`):
142+
To run tests from a specific stage, use option `-s` (`--stage`).
143+
Currently there are only three stages defined, `devicelab`,
144+
`devicelab_ios` and `devicelab_win`.
131145

132-
```sh
133-
dart bin/run.dart -a
134-
```
135-
136-
To run tests from a specific stage, use option `-s` (`--stage`):
137146

138147
```sh
139148
dart bin/run.dart -s {NAME_OF_STAGE}
140149
```
141150

142-
Currently there are only three stages defined, `devicelab`, `devicelab_ios` and `devicelab_win`.
143-
144151
# Reproducing broken builds locally
145152

146153
To reproduce the breakage locally `git checkout` the corresponding Flutter

dev/devicelab/bin/tasks/commands_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void main() {
8585
final Future<String> restartStartingText =
8686
stdout.stream.firstWhere((String line) => line.endsWith('hot restart...'));
8787
final Future<String> restartEndingText =
88-
stdout.stream.firstWhere((String line) => line.contains('Restart performed in '));
88+
stdout.stream.firstWhere((String line) => line.contains('Hot restart performed in '));
8989
print('test: pressing "R" to perform a full reload...');
9090
run.stdin.write('R');
9191
await restartStartingText;

dev/devicelab/bin/tasks/flutter_attach_test.dart

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,13 @@ Future<void> testReload(Process process, { Future<void> Function() onListening }
3131
.listen((String line) {
3232
print('attach:stdout: $line');
3333
stdout.add(line);
34-
if (line.contains('Waiting') && onListening != null) {
34+
if (line.contains('Waiting') && onListening != null)
3535
listening.complete(onListening());
36-
}
3736
if (line.contains('To quit, press "q".'))
3837
ready.complete();
3938
if (line.contains('Reloaded '))
4039
reloaded.complete();
41-
if (line.contains('Restarted app in '))
40+
if (line.contains('Restarted application in '))
4241
restarted.complete();
4342
if (line.contains('Application finished'))
4443
finished.complete();
@@ -91,7 +90,7 @@ void main() {
9190
await device.unlock();
9291
final Directory appDir = dir(path.join(flutterDirectory.path, 'dev/integration_tests/ui'));
9392
await inDirectory(appDir, () async {
94-
section('Build: starting...');
93+
section('Building');
9594
final String buildStdout = await eval(
9695
path.join(flutterDirectory.path, 'bin', 'flutter'),
9796
<String>['--suppress-analytics', 'build', 'apk', '--debug', 'lib/main.dart'],
@@ -105,15 +104,14 @@ void main() {
105104
await device.adb(<String>['install', '-r', apkPath]);
106105

107106
try {
108-
section('Launching attach.');
107+
section('Launching `flutter attach`');
109108
Process attachProcess = await startProcess(
110109
path.join(flutterDirectory.path, 'bin', 'flutter'),
111110
<String>['--suppress-analytics', 'attach', '-d', device.deviceId],
112111
isBot: false, // we just want to test the output, not have any debugging info
113112
);
114113

115114
await testReload(attachProcess, onListening: () async {
116-
section('Launching app.');
117115
await device.shellExec('am', <String>['start', '-n', kActivityId]);
118116
});
119117

@@ -124,15 +122,16 @@ void main() {
124122

125123
final String currentTime = (await device.shellEval('date', <String>['"+%F %R:%S.000"'])).trim();
126124
print('Start time on device: $currentTime');
127-
section('Launching app');
125+
section('Relaunching application');
128126
await device.shellExec('am', <String>['start', '-n', kActivityId]);
129127

128+
// If the next line fails, your device may not support regexp search.
130129
final String observatoryLine = await device.adb(<String>['logcat', '-e', 'Observatory listening on http:', '-m', '1', '-T', currentTime]);
131130
print('Found observatory line: $observatoryLine');
132131
final String observatoryPort = new RegExp(r'Observatory listening on http://.*:([0-9]+)').firstMatch(observatoryLine)[1];
133132
print('Extracted observatory port: $observatoryPort');
134133

135-
section('Launching attach with given port.');
134+
section('Launching attach with given port');
136135
attachProcess = await startProcess(
137136
path.join(flutterDirectory.path, 'bin', 'flutter'),
138137
<String>['--suppress-analytics', 'attach', '--debug-port', observatoryPort, '-d', device.deviceId],

dev/devicelab/bin/tasks/run_release_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ void main() {
5858
stdout.removeAt(0);
5959
if (stdout.first == 'Initializing gradle...')
6060
stdout.removeAt(0);
61+
if (stdout.first == 'Resolving dependencies...')
62+
stdout.removeAt(0);
6163
if (!(stdout.first.startsWith('Launching lib/main.dart on ') && stdout.first.endsWith(' in release mode...')))
6264
throw 'flutter run --release had unexpected first line: ${stdout.first}';
6365
stdout.removeAt(0);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2016 The Chromium Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import 'dart:async';
6+
7+
import 'package:flutter_devicelab/tasks/perf_tests.dart';
8+
import 'package:flutter_devicelab/framework/adb.dart';
9+
import 'package:flutter_devicelab/framework/framework.dart';
10+
11+
Future<Null> main() async {
12+
deviceOperatingSystem = DeviceOperatingSystem.android;
13+
await task(createTilesScrollPerfTest());
14+
}
15+

dev/devicelab/lib/tasks/analysis.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import 'dart:async';
66
import 'dart:io';
7+
import 'dart:math' as math;
78

89
import 'package:path/path.dart' as path;
910

@@ -90,13 +91,13 @@ class _MegaGalleryBenchmark {
9091

9192
/// Runs a [benchmark] several times and reports the average result.
9293
Future<double> _run(_Benchmark benchmark) async {
93-
double total = 0.0;
94+
double best;
9495
for (int i = 0; i < _kRunsPerBenchmark; i++) {
9596
// Delete cached analysis results.
9697
rmTree(dir('${Platform.environment['HOME']}/.dartServer'));
9798

98-
total += await benchmark();
99+
final double result = await benchmark();
100+
best = math.min(result, best ?? result);
99101
}
100-
final double average = total / _kRunsPerBenchmark;
101-
return average;
102+
return best;
102103
}

dev/devicelab/lib/tasks/perf_tests.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ TaskFunction createComplexLayoutScrollPerfTest() {
2222
).run;
2323
}
2424

25+
TaskFunction createTilesScrollPerfTest() {
26+
return new PerfTest(
27+
'${flutterDirectory.path}/dev/benchmarks/complex_layout',
28+
'test_driver/scroll_perf.dart',
29+
'tiles_scroll_perf',
30+
).run;
31+
}
32+
2533
TaskFunction createComplexLayoutScrollMemoryTest() {
2634
return new MemoryTest(
2735
'${flutterDirectory.path}/dev/benchmarks/complex_layout',

0 commit comments

Comments
 (0)