Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
d340e2f2
Unverified
Commit
d340e2f2
authored
Oct 04, 2018
by
Alexandre Ardhuin
Committed by
GitHub
Oct 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apply lint prefer_void_to_null in dev/ (#22661)
parent
89c5ace1
Changes
107
Show whitespace changes
Inline
Side-by-side
Showing
107 changed files
with
210 additions
and
212 deletions
+210
-212
exception_handling_test.dart
...automated_tests/flutter_test/exception_handling_test.dart
+1
-1
test_async_utils_guarded_test.dart
...ted_tests/flutter_test/test_async_utils_guarded_test.dart
+1
-1
test_async_utils_unguarded_test.dart
...d_tests/flutter_test/test_async_utils_unguarded_test.dart
+1
-1
scroll_perf_test.dart
...nchmarks/complex_layout/test_driver/scroll_perf_test.dart
+4
-4
semantics_perf_test.dart
...marks/complex_layout/test_driver/semantics_perf_test.dart
+1
-1
scroll_perf.dart
dev/benchmarks/complex_layout/test_memory/scroll_perf.dart
+3
-3
animation_bench.dart
...enchmarks/microbenchmarks/lib/stocks/animation_bench.dart
+1
-1
build_bench.dart
dev/benchmarks/microbenchmarks/lib/stocks/build_bench.dart
+1
-1
layout_bench.dart
dev/benchmarks/microbenchmarks/lib/stocks/layout_bench.dart
+1
-1
analyze-sample-code.dart
dev/bots/analyze-sample-code.dart
+1
-1
analyze.dart
dev/bots/analyze.dart
+8
-10
prepare_package.dart
dev/bots/prepare_package.dart
+9
-9
run_command.dart
dev/bots/run_command.dart
+1
-1
test.dart
dev/bots/test.dart
+9
-9
README.md
dev/devicelab/README.md
+1
-1
run.dart
dev/devicelab/bin/run.dart
+1
-1
analyzer_benchmark.dart
dev/devicelab/bin/tasks/analyzer_benchmark.dart
+1
-1
android_sample_catalog_generator.dart
...devicelab/bin/tasks/android_sample_catalog_generator.dart
+1
-1
basic_material_app_android__compile.dart
...icelab/bin/tasks/basic_material_app_android__compile.dart
+1
-1
basic_material_app_ios__compile.dart
dev/devicelab/bin/tasks/basic_material_app_ios__compile.dart
+1
-1
basic_material_app_win__compile.dart
dev/devicelab/bin/tasks/basic_material_app_win__compile.dart
+1
-1
channels_integration_test.dart
dev/devicelab/bin/tasks/channels_integration_test.dart
+1
-1
channels_integration_test_ios.dart
dev/devicelab/bin/tasks/channels_integration_test_ios.dart
+1
-1
channels_integration_test_win.dart
dev/devicelab/bin/tasks/channels_integration_test_win.dart
+1
-1
commands_test.dart
dev/devicelab/bin/tasks/commands_test.dart
+2
-2
complex_layout__start_up.dart
dev/devicelab/bin/tasks/complex_layout__start_up.dart
+1
-1
complex_layout_android__compile.dart
dev/devicelab/bin/tasks/complex_layout_android__compile.dart
+1
-1
complex_layout_ios__compile.dart
dev/devicelab/bin/tasks/complex_layout_ios__compile.dart
+1
-1
complex_layout_ios__start_up.dart
dev/devicelab/bin/tasks/complex_layout_ios__start_up.dart
+1
-1
complex_layout_scroll_perf__memory.dart
...vicelab/bin/tasks/complex_layout_scroll_perf__memory.dart
+1
-1
complex_layout_scroll_perf__timeline_summary.dart
...n/tasks/complex_layout_scroll_perf__timeline_summary.dart
+1
-1
complex_layout_scroll_perf_ios__timeline_summary.dart
...sks/complex_layout_scroll_perf_ios__timeline_summary.dart
+1
-1
complex_layout_win__compile.dart
dev/devicelab/bin/tasks/complex_layout_win__compile.dart
+1
-1
dartdocs.dart
dev/devicelab/bin/tasks/dartdocs.dart
+1
-1
embedded_android_views_integration_test.dart
...ab/bin/tasks/embedded_android_views_integration_test.dart
+1
-1
external_ui_integration_test.dart
dev/devicelab/bin/tasks/external_ui_integration_test.dart
+1
-1
external_ui_integration_test_ios.dart
...devicelab/bin/tasks/external_ui_integration_test_ios.dart
+1
-1
flavors_test.dart
dev/devicelab/bin/tasks/flavors_test.dart
+1
-1
flavors_test_ios.dart
dev/devicelab/bin/tasks/flavors_test_ios.dart
+1
-1
flavors_test_win.dart
dev/devicelab/bin/tasks/flavors_test_win.dart
+1
-1
flutter_attach_test.dart
dev/devicelab/bin/tasks/flutter_attach_test.dart
+7
-7
flutter_gallery__back_button_memory.dart
...icelab/bin/tasks/flutter_gallery__back_button_memory.dart
+3
-3
flutter_gallery__memory_nav.dart
dev/devicelab/bin/tasks/flutter_gallery__memory_nav.dart
+1
-1
flutter_gallery__start_up.dart
dev/devicelab/bin/tasks/flutter_gallery__start_up.dart
+1
-1
flutter_gallery__transition_perf.dart
...devicelab/bin/tasks/flutter_gallery__transition_perf.dart
+1
-1
flutter_gallery__transition_perf_with_semantics.dart
...asks/flutter_gallery__transition_perf_with_semantics.dart
+1
-1
flutter_gallery_android__compile.dart
...devicelab/bin/tasks/flutter_gallery_android__compile.dart
+1
-1
flutter_gallery_instrumentation_test.dart
...celab/bin/tasks/flutter_gallery_instrumentation_test.dart
+1
-1
flutter_gallery_ios32__start_up.dart
dev/devicelab/bin/tasks/flutter_gallery_ios32__start_up.dart
+1
-1
flutter_gallery_ios32__transition_perf.dart
...lab/bin/tasks/flutter_gallery_ios32__transition_perf.dart
+1
-1
flutter_gallery_ios__compile.dart
dev/devicelab/bin/tasks/flutter_gallery_ios__compile.dart
+1
-1
flutter_gallery_ios__start_up.dart
dev/devicelab/bin/tasks/flutter_gallery_ios__start_up.dart
+1
-1
flutter_gallery_ios__transition_perf.dart
...celab/bin/tasks/flutter_gallery_ios__transition_perf.dart
+1
-1
flutter_gallery_win__compile.dart
dev/devicelab/bin/tasks/flutter_gallery_win__compile.dart
+1
-1
flutter_view__start_up.dart
dev/devicelab/bin/tasks/flutter_view__start_up.dart
+1
-1
flutter_view_ios__start_up.dart
dev/devicelab/bin/tasks/flutter_view_ios__start_up.dart
+1
-1
gradle_plugin_test.dart
dev/devicelab/bin/tasks/gradle_plugin_test.dart
+6
-6
hello_world__memory.dart
dev/devicelab/bin/tasks/hello_world__memory.dart
+3
-3
hello_world_android__compile.dart
dev/devicelab/bin/tasks/hello_world_android__compile.dart
+1
-1
hello_world_ios__compile.dart
dev/devicelab/bin/tasks/hello_world_ios__compile.dart
+1
-1
hot_mode_dev_cycle__benchmark.dart
dev/devicelab/bin/tasks/hot_mode_dev_cycle__benchmark.dart
+1
-1
hot_mode_dev_cycle_linux__benchmark.dart
...icelab/bin/tasks/hot_mode_dev_cycle_linux__benchmark.dart
+1
-1
hot_mode_dev_cycle_win__benchmark.dart
...evicelab/bin/tasks/hot_mode_dev_cycle_win__benchmark.dart
+1
-1
integration_ui.dart
dev/devicelab/bin/tasks/integration_ui.dart
+1
-1
integration_ui_ios.dart
dev/devicelab/bin/tasks/integration_ui_ios.dart
+1
-1
ios_sample_catalog_generator.dart
dev/devicelab/bin/tasks/ios_sample_catalog_generator.dart
+1
-1
microbenchmarks.dart
dev/devicelab/bin/tasks/microbenchmarks.dart
+1
-1
microbenchmarks_ios.dart
dev/devicelab/bin/tasks/microbenchmarks_ios.dart
+1
-1
module_test.dart
dev/devicelab/bin/tasks/module_test.dart
+1
-1
module_test_ios.dart
dev/devicelab/bin/tasks/module_test_ios.dart
+1
-1
platform_channel_sample_test.dart
dev/devicelab/bin/tasks/platform_channel_sample_test.dart
+1
-1
platform_channel_sample_test_ios.dart
...devicelab/bin/tasks/platform_channel_sample_test_ios.dart
+1
-1
platform_interaction_test.dart
dev/devicelab/bin/tasks/platform_interaction_test.dart
+1
-1
platform_interaction_test_ios.dart
dev/devicelab/bin/tasks/platform_interaction_test_ios.dart
+1
-1
platform_view__start_up.dart
dev/devicelab/bin/tasks/platform_view__start_up.dart
+1
-1
platform_view_ios__start_up.dart
dev/devicelab/bin/tasks/platform_view_ios__start_up.dart
+1
-1
plugin_test.dart
dev/devicelab/bin/tasks/plugin_test.dart
+1
-1
plugin_test_ios.dart
dev/devicelab/bin/tasks/plugin_test_ios.dart
+1
-1
plugin_test_win.dart
dev/devicelab/bin/tasks/plugin_test_win.dart
+1
-1
routing_test.dart
dev/devicelab/bin/tasks/routing_test.dart
+1
-1
run_machine_concurrent_hot_reload.dart
...evicelab/bin/tasks/run_machine_concurrent_hot_reload.dart
+1
-1
run_release_test.dart
dev/devicelab/bin/tasks/run_release_test.dart
+1
-1
service_extensions_test.dart
dev/devicelab/bin/tasks/service_extensions_test.dart
+1
-1
smoke_test_failure.dart
dev/devicelab/bin/tasks/smoke_test_failure.dart
+1
-1
smoke_test_setup_failure.dart
dev/devicelab/bin/tasks/smoke_test_setup_failure.dart
+1
-1
smoke_test_success.dart
dev/devicelab/bin/tasks/smoke_test_success.dart
+1
-1
smoke_test_throws.dart
dev/devicelab/bin/tasks/smoke_test_throws.dart
+1
-1
technical_debt__cost.dart
dev/devicelab/bin/tasks/technical_debt__cost.dart
+1
-1
tiles_scroll_perf__timeline_summary.dart
...icelab/bin/tasks/tiles_scroll_perf__timeline_summary.dart
+1
-1
adb.dart
dev/devicelab/lib/framework/adb.dart
+25
-25
ios.dart
dev/devicelab/lib/framework/ios.dart
+3
-3
runner.dart
dev/devicelab/lib/framework/runner.dart
+2
-2
utils.dart
dev/devicelab/lib/framework/utils.dart
+11
-11
hot_mode_tests.dart
dev/devicelab/lib/tasks/hot_mode_tests.dart
+8
-8
plugin_tests.dart
dev/devicelab/lib/tasks/plugin_tests.dart
+4
-4
save_catalog_screenshots.dart
dev/devicelab/lib/tasks/save_catalog_screenshots.dart
+3
-3
adb_test.dart
dev/devicelab/test/adb_test.dart
+1
-1
main.dart
dev/integration_tests/external_ui/lib/main.dart
+4
-4
main_test.dart
dev/integration_tests/external_ui/test_driver/main_test.dart
+3
-3
driver_test.dart
dev/integration_tests/ui/test_driver/driver_test.dart
+4
-4
keyboard_resize_test.dart
...ntegration_tests/ui/test_driver/keyboard_resize_test.dart
+2
-2
keyboard_textfield_test.dart
...gration_tests/ui/test_driver/keyboard_textfield_test.dart
+1
-1
material_arc.dart
dev/manual_tests/lib/material_arc.dart
+1
-1
dartdoc.dart
dev/tools/dartdoc.dart
+1
-1
gen_date_localizations.dart
dev/tools/gen_date_localizations.dart
+1
-1
java_and_objc_doc.dart
dev/tools/java_and_objc_doc.dart
+2
-2
vitool.dart
dev/tools/vitool/lib/vitool.dart
+1
-1
No files found.
dev/automated_tests/flutter_test/exception_handling_test.dart
View file @
d340e2f2
...
@@ -13,6 +13,6 @@ void main() {
...
@@ -13,6 +13,6 @@ void main() {
throw
FlutterError
(
'Who lives, who dies, who tells your story?'
);
throw
FlutterError
(
'Who lives, who dies, who tells your story?'
);
});
});
testWidgets
(
'Exception handling in test harness - uncaught Future error'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Exception handling in test harness - uncaught Future error'
,
(
WidgetTester
tester
)
async
{
Future
<
Null
>.
error
(
'Who lives, who dies, who tells your story?'
);
Future
<
void
>.
error
(
'Who lives, who dies, who tells your story?'
);
});
});
}
}
dev/automated_tests/flutter_test/test_async_utils_guarded_test.dart
View file @
d340e2f2
...
@@ -12,7 +12,7 @@ class TestTestBinding extends AutomatedTestWidgetsFlutterBinding {
...
@@ -12,7 +12,7 @@ class TestTestBinding extends AutomatedTestWidgetsFlutterBinding {
static
void
testPrint
(
String
message
,
{
int
wrapWidth
})
{
print
(
message
);
}
static
void
testPrint
(
String
message
,
{
int
wrapWidth
})
{
print
(
message
);
}
}
}
Future
<
Null
>
guardedHelper
(
WidgetTester
tester
)
{
Future
<
void
>
guardedHelper
(
WidgetTester
tester
)
{
return
TestAsyncUtils
.
guard
(()
async
{
return
TestAsyncUtils
.
guard
(()
async
{
await
tester
.
pumpWidget
(
const
Text
(
'Hello'
,
textDirection:
TextDirection
.
ltr
));
await
tester
.
pumpWidget
(
const
Text
(
'Hello'
,
textDirection:
TextDirection
.
ltr
));
});
});
...
...
dev/automated_tests/flutter_test/test_async_utils_unguarded_test.dart
View file @
d340e2f2
...
@@ -11,7 +11,7 @@ class TestTestBinding extends AutomatedTestWidgetsFlutterBinding {
...
@@ -11,7 +11,7 @@ class TestTestBinding extends AutomatedTestWidgetsFlutterBinding {
static
void
testPrint
(
String
message
,
{
int
wrapWidth
})
{
print
(
message
);
}
static
void
testPrint
(
String
message
,
{
int
wrapWidth
})
{
print
(
message
);
}
}
}
Future
<
Null
>
helperFunction
(
WidgetTester
tester
)
async
{
Future
<
void
>
helperFunction
(
WidgetTester
tester
)
async
{
await
tester
.
pump
();
await
tester
.
pump
();
}
}
...
...
dev/benchmarks/complex_layout/test_driver/scroll_perf_test.dart
View file @
d340e2f2
...
@@ -20,12 +20,12 @@ void main() {
...
@@ -20,12 +20,12 @@ void main() {
driver
.
close
();
driver
.
close
();
});
});
Future
<
Null
>
testScrollPerf
(
String
listKey
,
String
summaryName
)
async
{
Future
<
void
>
testScrollPerf
(
String
listKey
,
String
summaryName
)
async
{
// The slight initial delay avoids starting the timing during a
// The slight initial delay avoids starting the timing during a
// period of increased load on the device. Without this delay, the
// period of increased load on the device. Without this delay, the
// benchmark has greater noise.
// benchmark has greater noise.
// See: https://github.com/flutter/flutter/issues/19434
// See: https://github.com/flutter/flutter/issues/19434
await
Future
<
Null
>.
delayed
(
const
Duration
(
milliseconds:
250
));
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
250
));
final
Timeline
timeline
=
await
driver
.
traceAction
(()
async
{
final
Timeline
timeline
=
await
driver
.
traceAction
(()
async
{
// Find the scrollable stock list
// Find the scrollable stock list
final
SerializableFinder
list
=
find
.
byValueKey
(
listKey
);
final
SerializableFinder
list
=
find
.
byValueKey
(
listKey
);
...
@@ -34,13 +34,13 @@ void main() {
...
@@ -34,13 +34,13 @@ void main() {
// Scroll down
// Scroll down
for
(
int
i
=
0
;
i
<
5
;
i
+=
1
)
{
for
(
int
i
=
0
;
i
<
5
;
i
+=
1
)
{
await
driver
.
scroll
(
list
,
0.0
,
-
300.0
,
const
Duration
(
milliseconds:
300
));
await
driver
.
scroll
(
list
,
0.0
,
-
300.0
,
const
Duration
(
milliseconds:
300
));
await
Future
<
Null
>.
delayed
(
const
Duration
(
milliseconds:
500
));
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
500
));
}
}
// Scroll up
// Scroll up
for
(
int
i
=
0
;
i
<
5
;
i
+=
1
)
{
for
(
int
i
=
0
;
i
<
5
;
i
+=
1
)
{
await
driver
.
scroll
(
list
,
0.0
,
300.0
,
const
Duration
(
milliseconds:
300
));
await
driver
.
scroll
(
list
,
0.0
,
300.0
,
const
Duration
(
milliseconds:
300
));
await
Future
<
Null
>.
delayed
(
const
Duration
(
milliseconds:
500
));
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
500
));
}
}
});
});
...
...
dev/benchmarks/complex_layout/test_driver/semantics_perf_test.dart
View file @
d340e2f2
...
@@ -25,7 +25,7 @@ void main() {
...
@@ -25,7 +25,7 @@ void main() {
test
(
'inital tree creation'
,
()
async
{
test
(
'inital tree creation'
,
()
async
{
// Let app become fully idle.
// Let app become fully idle.
await
Future
<
Null
>.
delayed
(
const
Duration
(
seconds:
2
));
await
Future
<
void
>.
delayed
(
const
Duration
(
seconds:
2
));
final
Timeline
timeline
=
await
driver
.
traceAction
(()
async
{
final
Timeline
timeline
=
await
driver
.
traceAction
(()
async
{
expect
(
await
driver
.
setSemantics
(
true
),
isTrue
);
expect
(
await
driver
.
setSemantics
(
true
),
isTrue
);
...
...
dev/benchmarks/complex_layout/test_memory/scroll_perf.dart
View file @
d340e2f2
...
@@ -37,7 +37,7 @@ Future<void> main() async {
...
@@ -37,7 +37,7 @@ Future<void> main() async {
/// Wait 50ms to allow the GPU thread to actually put up the frame. (The
/// Wait 50ms to allow the GPU thread to actually put up the frame. (The
/// endOfFrame future ends when we send the data to the engine, before the GPU
/// endOfFrame future ends when we send the data to the engine, before the GPU
/// thread has had a chance to rasterize, etc.)
/// thread has had a chance to rasterize, etc.)
await
Future
<
Null
>.
delayed
(
const
Duration
(
milliseconds:
50
));
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
50
));
debugPrint
(
'==== MEMORY BENCHMARK ==== READY ===='
);
debugPrint
(
'==== MEMORY BENCHMARK ==== READY ===='
);
await
ready
.
future
;
// waits for tap sent by devicelab task
await
ready
.
future
;
// waits for tap sent by devicelab task
...
@@ -58,14 +58,14 @@ Future<void> main() async {
...
@@ -58,14 +58,14 @@ Future<void> main() async {
for
(
int
iteration
=
0
;
iteration
<
maxIterations
;
iteration
+=
1
)
{
for
(
int
iteration
=
0
;
iteration
<
maxIterations
;
iteration
+=
1
)
{
debugPrint
(
'Scroll down...
$iteration
/
$maxIterations
'
);
debugPrint
(
'Scroll down...
$iteration
/
$maxIterations
'
);
await
controller
.
fling
(
find
.
byType
(
ListView
),
const
Offset
(
0.0
,
-
700.0
),
speed
);
await
controller
.
fling
(
find
.
byType
(
ListView
),
const
Offset
(
0.0
,
-
700.0
),
speed
);
await
Future
<
Null
>.
delayed
(
pauses
);
await
Future
<
void
>.
delayed
(
pauses
);
}
}
// Scroll up
// Scroll up
for
(
int
iteration
=
0
;
iteration
<
maxIterations
;
iteration
+=
1
)
{
for
(
int
iteration
=
0
;
iteration
<
maxIterations
;
iteration
+=
1
)
{
debugPrint
(
'Scroll up...
$iteration
/
$maxIterations
'
);
debugPrint
(
'Scroll up...
$iteration
/
$maxIterations
'
);
await
controller
.
fling
(
find
.
byType
(
ListView
),
const
Offset
(
0.0
,
300.0
),
speed
);
await
controller
.
fling
(
find
.
byType
(
ListView
),
const
Offset
(
0.0
,
300.0
),
speed
);
await
Future
<
Null
>.
delayed
(
pauses
);
await
Future
<
void
>.
delayed
(
pauses
);
}
}
debugPrint
(
'==== MEMORY BENCHMARK ==== DONE ===='
);
debugPrint
(
'==== MEMORY BENCHMARK ==== DONE ===='
);
...
...
dev/benchmarks/microbenchmarks/lib/stocks/animation_bench.dart
View file @
d340e2f2
...
@@ -33,7 +33,7 @@ class BenchmarkingBinding extends LiveTestWidgetsFlutterBinding {
...
@@ -33,7 +33,7 @@ class BenchmarkingBinding extends LiveTestWidgetsFlutterBinding {
}
}
}
}
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
assert
(
false
);
// don't run this in checked mode! Use --release.
assert
(
false
);
// don't run this in checked mode! Use --release.
stock_data
.
StockData
.
actuallyFetchData
=
false
;
stock_data
.
StockData
.
actuallyFetchData
=
false
;
...
...
dev/benchmarks/microbenchmarks/lib/stocks/build_bench.dart
View file @
d340e2f2
...
@@ -15,7 +15,7 @@ import '../common.dart';
...
@@ -15,7 +15,7 @@ import '../common.dart';
const
Duration
kBenchmarkTime
=
Duration
(
seconds:
15
);
const
Duration
kBenchmarkTime
=
Duration
(
seconds:
15
);
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
assert
(
false
);
// don't run this in checked mode! Use --release.
assert
(
false
);
// don't run this in checked mode! Use --release.
stock_data
.
StockData
.
actuallyFetchData
=
false
;
stock_data
.
StockData
.
actuallyFetchData
=
false
;
...
...
dev/benchmarks/microbenchmarks/lib/stocks/layout_bench.dart
View file @
d340e2f2
...
@@ -15,7 +15,7 @@ import '../common.dart';
...
@@ -15,7 +15,7 @@ import '../common.dart';
const
Duration
kBenchmarkTime
=
Duration
(
seconds:
15
);
const
Duration
kBenchmarkTime
=
Duration
(
seconds:
15
);
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
stock_data
.
StockData
.
actuallyFetchData
=
false
;
stock_data
.
StockData
.
actuallyFetchData
=
false
;
// We control the framePolicy below to prevent us from scheduling frames in
// We control the framePolicy below to prevent us from scheduling frames in
...
...
dev/bots/analyze-sample-code.dart
View file @
d340e2f2
...
@@ -99,7 +99,7 @@ class Section {
...
@@ -99,7 +99,7 @@ class Section {
const
String
kDartDocPrefix
=
'///'
;
const
String
kDartDocPrefix
=
'///'
;
const
String
kDartDocPrefixWithSpace
=
'
$kDartDocPrefix
'
;
const
String
kDartDocPrefixWithSpace
=
'
$kDartDocPrefix
'
;
Future
<
Null
>
main
(
List
<
String
>
arguments
)
async
{
Future
<
void
>
main
(
List
<
String
>
arguments
)
async
{
final
Directory
tempDir
=
Directory
.
systemTemp
.
createTempSync
(
'flutter_analyze_sample_code.'
);
final
Directory
tempDir
=
Directory
.
systemTemp
.
createTempSync
(
'flutter_analyze_sample_code.'
);
int
exitCode
=
1
;
int
exitCode
=
1
;
bool
keepMain
=
false
;
bool
keepMain
=
false
;
...
...
dev/bots/analyze.dart
View file @
d340e2f2
...
@@ -11,8 +11,6 @@ import 'package:meta/meta.dart';
...
@@ -11,8 +11,6 @@ import 'package:meta/meta.dart';
import
'run_command.dart'
;
import
'run_command.dart'
;
typedef
ShardRunner
=
Future
<
Null
>
Function
();
final
String
flutterRoot
=
path
.
dirname
(
path
.
dirname
(
path
.
dirname
(
path
.
fromUri
(
Platform
.
script
))));
final
String
flutterRoot
=
path
.
dirname
(
path
.
dirname
(
path
.
dirname
(
path
.
fromUri
(
Platform
.
script
))));
final
String
flutter
=
path
.
join
(
flutterRoot
,
'bin'
,
Platform
.
isWindows
?
'flutter.bat'
:
'flutter'
);
final
String
flutter
=
path
.
join
(
flutterRoot
,
'bin'
,
Platform
.
isWindows
?
'flutter.bat'
:
'flutter'
);
final
String
dart
=
path
.
join
(
flutterRoot
,
'bin'
,
'cache'
,
'dart-sdk'
,
'bin'
,
Platform
.
isWindows
?
'dart.exe'
:
'dart'
);
final
String
dart
=
path
.
join
(
flutterRoot
,
'bin'
,
'cache'
,
'dart-sdk'
,
'bin'
,
Platform
.
isWindows
?
'dart.exe'
:
'dart'
);
...
@@ -25,7 +23,7 @@ final String pubCache = path.join(flutterRoot, '.pub-cache');
...
@@ -25,7 +23,7 @@ final String pubCache = path.join(flutterRoot, '.pub-cache');
///
///
/// For example:
/// For example:
/// bin/cache/dart-sdk/bin/dart dev/bots/analyze.dart --dart-sdk=/tmp/dart-sdk
/// bin/cache/dart-sdk/bin/dart dev/bots/analyze.dart --dart-sdk=/tmp/dart-sdk
Future
<
Null
>
main
(
List
<
String
>
args
)
async
{
Future
<
void
>
main
(
List
<
String
>
args
)
async
{
await
_verifyNoTestPackageImports
(
flutterRoot
);
await
_verifyNoTestPackageImports
(
flutterRoot
);
await
_verifyGeneratedPluginRegistrants
(
flutterRoot
);
await
_verifyGeneratedPluginRegistrants
(
flutterRoot
);
await
_verifyNoBadImportsInFlutter
(
flutterRoot
);
await
_verifyNoBadImportsInFlutter
(
flutterRoot
);
...
@@ -84,7 +82,7 @@ Future<Null> main(List<String> args) async {
...
@@ -84,7 +82,7 @@ Future<Null> main(List<String> args) async {
print
(
'
${bold}
DONE: Analysis successful.
$reset
'
);
print
(
'
${bold}
DONE: Analysis successful.
$reset
'
);
}
}
Future
<
Null
>
_verifyInternationalizations
()
async
{
Future
<
void
>
_verifyInternationalizations
()
async
{
final
EvalResult
genResult
=
await
_evalCommand
(
final
EvalResult
genResult
=
await
_evalCommand
(
dart
,
dart
,
<
String
>[
<
String
>[
...
@@ -134,7 +132,7 @@ Future<String> _getCommitRange() async {
...
@@ -134,7 +132,7 @@ Future<String> _getCommitRange() async {
}
}
Future
<
Null
>
_checkForTrailingSpaces
()
async
{
Future
<
void
>
_checkForTrailingSpaces
()
async
{
if
(!
Platform
.
isWindows
)
{
if
(!
Platform
.
isWindows
)
{
final
String
commitRange
=
Platform
.
environment
.
containsKey
(
'TEST_COMMIT_RANGE'
)
final
String
commitRange
=
Platform
.
environment
.
containsKey
(
'TEST_COMMIT_RANGE'
)
?
Platform
.
environment
[
'TEST_COMMIT_RANGE'
]
?
Platform
.
environment
[
'TEST_COMMIT_RANGE'
]
...
@@ -229,7 +227,7 @@ Future<EvalResult> _evalCommand(String executable, List<String> arguments, {
...
@@ -229,7 +227,7 @@ Future<EvalResult> _evalCommand(String executable, List<String> arguments, {
return
result
;
return
result
;
}
}
Future
<
Null
>
_runFlutterAnalyze
(
String
workingDirectory
,
{
Future
<
void
>
_runFlutterAnalyze
(
String
workingDirectory
,
{
List
<
String
>
options
=
const
<
String
>[]
List
<
String
>
options
=
const
<
String
>[]
})
{
})
{
return
runCommand
(
flutter
,
<
String
>[
'analyze'
]..
addAll
(
options
),
return
runCommand
(
flutter
,
<
String
>[
'analyze'
]..
addAll
(
options
),
...
@@ -237,7 +235,7 @@ Future<Null> _runFlutterAnalyze(String workingDirectory, {
...
@@ -237,7 +235,7 @@ Future<Null> _runFlutterAnalyze(String workingDirectory, {
);
);
}
}
Future
<
Null
>
_verifyNoTestPackageImports
(
String
workingDirectory
)
async
{
Future
<
void
>
_verifyNoTestPackageImports
(
String
workingDirectory
)
async
{
// TODO(ianh): Remove this whole test once https://github.com/dart-lang/matcher/issues/98 is fixed.
// TODO(ianh): Remove this whole test once https://github.com/dart-lang/matcher/issues/98 is fixed.
final
List
<
String
>
shims
=
<
String
>[];
final
List
<
String
>
shims
=
<
String
>[];
final
List
<
String
>
errors
=
Directory
(
workingDirectory
)
final
List
<
String
>
errors
=
Directory
(
workingDirectory
)
...
@@ -315,7 +313,7 @@ Future<Null> _verifyNoTestPackageImports(String workingDirectory) async {
...
@@ -315,7 +313,7 @@ Future<Null> _verifyNoTestPackageImports(String workingDirectory) async {
}
}
}
}
Future
<
Null
>
_verifyNoBadImportsInFlutter
(
String
workingDirectory
)
async
{
Future
<
void
>
_verifyNoBadImportsInFlutter
(
String
workingDirectory
)
async
{
final
List
<
String
>
errors
=
<
String
>[];
final
List
<
String
>
errors
=
<
String
>[];
final
String
libPath
=
path
.
join
(
workingDirectory
,
'packages'
,
'flutter'
,
'lib'
);
final
String
libPath
=
path
.
join
(
workingDirectory
,
'packages'
,
'flutter'
,
'lib'
);
final
String
srcPath
=
path
.
join
(
workingDirectory
,
'packages'
,
'flutter'
,
'lib'
,
'src'
);
final
String
srcPath
=
path
.
join
(
workingDirectory
,
'packages'
,
'flutter'
,
'lib'
,
'src'
);
...
@@ -439,7 +437,7 @@ List<T> _deepSearch<T>(Map<T, Set<T>> map, T start, [ Set<T> seen ]) {
...
@@ -439,7 +437,7 @@ List<T> _deepSearch<T>(Map<T, Set<T>> map, T start, [ Set<T> seen ]) {
return
null
;
return
null
;
}
}
Future
<
Null
>
_verifyNoBadImportsInFlutterTools
(
String
workingDirectory
)
async
{
Future
<
void
>
_verifyNoBadImportsInFlutterTools
(
String
workingDirectory
)
async
{
final
List
<
String
>
errors
=
<
String
>[];
final
List
<
String
>
errors
=
<
String
>[];
for
(
FileSystemEntity
entity
in
Directory
(
path
.
join
(
workingDirectory
,
'packages'
,
'flutter_tools'
,
'lib'
))
for
(
FileSystemEntity
entity
in
Directory
(
path
.
join
(
workingDirectory
,
'packages'
,
'flutter_tools'
,
'lib'
))
.
listSync
(
recursive:
true
)
.
listSync
(
recursive:
true
)
...
@@ -463,7 +461,7 @@ Future<Null> _verifyNoBadImportsInFlutterTools(String workingDirectory) async {
...
@@ -463,7 +461,7 @@ Future<Null> _verifyNoBadImportsInFlutterTools(String workingDirectory) async {
}
}
}
}
Future
<
Null
>
_verifyGeneratedPluginRegistrants
(
String
flutterRoot
)
async
{
Future
<
void
>
_verifyGeneratedPluginRegistrants
(
String
flutterRoot
)
async
{
final
Directory
flutterRootDir
=
Directory
(
flutterRoot
);
final
Directory
flutterRootDir
=
Directory
(
flutterRoot
);
final
Map
<
String
,
List
<
File
>>
packageToRegistrants
=
<
String
,
List
<
File
>>{};
final
Map
<
String
,
List
<
File
>>
packageToRegistrants
=
<
String
,
List
<
File
>>{};
...
...
dev/bots/prepare_package.dart
View file @
d340e2f2
...
@@ -119,8 +119,8 @@ class ProcessRunner {
...
@@ -119,8 +119,8 @@ class ProcessRunner {
stderr
.
write
(
'Running "
${commandLine.join(' ')}
" in
${workingDirectory.path}
.
\n
'
);
stderr
.
write
(
'Running "
${commandLine.join(' ')}
" in
${workingDirectory.path}
.
\n
'
);
}
}
final
List
<
int
>
output
=
<
int
>[];
final
List
<
int
>
output
=
<
int
>[];
final
Completer
<
Null
>
stdoutComplete
=
Completer
<
Null
>();
final
Completer
<
void
>
stdoutComplete
=
Completer
<
void
>();
final
Completer
<
Null
>
stderrComplete
=
Completer
<
Null
>();
final
Completer
<
void
>
stderrComplete
=
Completer
<
void
>();
Process
process
;
Process
process
;
Future
<
int
>
allComplete
()
async
{
Future
<
int
>
allComplete
()
async
{
await
stderrComplete
.
future
;
await
stderrComplete
.
future
;
...
@@ -291,7 +291,7 @@ class ArchiveCreator {
...
@@ -291,7 +291,7 @@ class ArchiveCreator {
/// Clone the Flutter repo and make sure that the git environment is sane
/// Clone the Flutter repo and make sure that the git environment is sane
/// for when the user will unpack it.
/// for when the user will unpack it.
Future
<
Null
>
_checkoutFlutter
()
async
{
Future
<
void
>
_checkoutFlutter
()
async
{
// We want the user to start out the in the specified branch instead of a
// We want the user to start out the in the specified branch instead of a
// detached head. To do that, we need to make sure the branch points at the
// detached head. To do that, we need to make sure the branch points at the
// desired revision.
// desired revision.
...
@@ -303,7 +303,7 @@ class ArchiveCreator {
...
@@ -303,7 +303,7 @@ class ArchiveCreator {
}
}
/// Retrieve the MinGit executable from storage and unpack it.
/// Retrieve the MinGit executable from storage and unpack it.
Future
<
Null
>
_installMinGitIfNeeded
()
async
{
Future
<
void
>
_installMinGitIfNeeded
()
async
{
if
(!
platform
.
isWindows
)
{
if
(!
platform
.
isWindows
)
{
return
;
return
;
}
}
...
@@ -319,7 +319,7 @@ class ArchiveCreator {
...
@@ -319,7 +319,7 @@ class ArchiveCreator {
/// Prepare the archive repo so that it has all of the caches warmed up and
/// Prepare the archive repo so that it has all of the caches warmed up and
/// is configured for the user to begin working.
/// is configured for the user to begin working.
Future
<
Null
>
_populateCaches
()
async
{
Future
<
void
>
_populateCaches
()
async
{
await
_runFlutter
(<
String
>[
'doctor'
]);
await
_runFlutter
(<
String
>[
'doctor'
]);
await
_runFlutter
(<
String
>[
'update-packages'
]);
await
_runFlutter
(<
String
>[
'update-packages'
]);
await
_runFlutter
(<
String
>[
'precache'
]);
await
_runFlutter
(<
String
>[
'precache'
]);
...
@@ -342,7 +342,7 @@ class ArchiveCreator {
...
@@ -342,7 +342,7 @@ class ArchiveCreator {
}
}
/// Write the archive to the given output file.
/// Write the archive to the given output file.
Future
<
Null
>
_archiveFiles
(
File
outputFile
)
async
{
Future
<
void
>
_archiveFiles
(
File
outputFile
)
async
{
if
(
outputFile
.
path
.
toLowerCase
().
endsWith
(
'.zip'
))
{
if
(
outputFile
.
path
.
toLowerCase
().
endsWith
(
'.zip'
))
{
await
_createZipArchive
(
outputFile
,
flutterRoot
);
await
_createZipArchive
(
outputFile
,
flutterRoot
);
}
else
if
(
outputFile
.
path
.
toLowerCase
().
endsWith
(
'.tar.xz'
))
{
}
else
if
(
outputFile
.
path
.
toLowerCase
().
endsWith
(
'.tar.xz'
))
{
...
@@ -454,7 +454,7 @@ class ArchivePublisher {
...
@@ -454,7 +454,7 @@ class ArchivePublisher {
static
String
getMetadataFilename
(
Platform
platform
)
=>
'releases_
${platform.operatingSystem.toLowerCase()}
.json'
;
static
String
getMetadataFilename
(
Platform
platform
)
=>
'releases_
${platform.operatingSystem.toLowerCase()}
.json'
;
/// Publish the archive to Google Storage.
/// Publish the archive to Google Storage.
Future
<
Null
>
publishArchive
()
async
{
Future
<
void
>
publishArchive
()
async
{
final
String
destGsPath
=
'
$gsReleaseFolder
/
$destinationArchivePath
'
;
final
String
destGsPath
=
'
$gsReleaseFolder
/
$destinationArchivePath
'
;
await
_cloudCopy
(
outputFile
.
absolute
.
path
,
destGsPath
);
await
_cloudCopy
(
outputFile
.
absolute
.
path
,
destGsPath
);
assert
(
tempDir
.
existsSync
());
assert
(
tempDir
.
existsSync
());
...
@@ -497,7 +497,7 @@ class ArchivePublisher {
...
@@ -497,7 +497,7 @@ class ArchivePublisher {
return
jsonData
;
return
jsonData
;
}
}
Future
<
Null
>
_updateMetadata
()
async
{
Future
<
void
>
_updateMetadata
()
async
{
// We can't just cat the metadata from the server with 'gsutil cat', because
// We can't just cat the metadata from the server with 'gsutil cat', because
// Windows wants to echo the commands that execute in gsutil.bat to the
// Windows wants to echo the commands that execute in gsutil.bat to the
// stdout when we do that. So, we copy the file locally and then read it
// stdout when we do that. So, we copy the file locally and then read it
...
@@ -569,7 +569,7 @@ class ArchivePublisher {
...
@@ -569,7 +569,7 @@ class ArchivePublisher {
///
///
/// Archives contain the executables and customizations for the platform that
/// Archives contain the executables and customizations for the platform that
/// they are created on.
/// they are created on.
Future
<
Null
>
main
(
List
<
String
>
argList
)
async
{
Future
<
void
>
main
(
List
<
String
>
argList
)
async
{
final
ArgParser
argParser
=
ArgParser
();
final
ArgParser
argParser
=
ArgParser
();
argParser
.
addOption
(
argParser
.
addOption
(
'temp_dir'
,
'temp_dir'
,
...
...
dev/bots/run_command.dart
View file @
d340e2f2
...
@@ -30,7 +30,7 @@ void printProgress(String action, String workingDir, String command) {
...
@@ -30,7 +30,7 @@ void printProgress(String action, String workingDir, String command) {
print
(
'
$arrow
$action
: cd
$cyan$workingDir$reset
;
$yellow$command$reset
'
);
print
(
'
$arrow
$action
: cd
$cyan$workingDir$reset
;
$yellow$command$reset
'
);
}
}
Future
<
Null
>
runCommand
(
String
executable
,
List
<
String
>
arguments
,
{
Future
<
void
>
runCommand
(
String
executable
,
List
<
String
>
arguments
,
{
String
workingDirectory
,
String
workingDirectory
,
Map
<
String
,
String
>
environment
,
Map
<
String
,
String
>
environment
,
bool
expectNonZeroExit
=
false
,
bool
expectNonZeroExit
=
false
,
...
...
dev/bots/test.dart
View file @
d340e2f2
...
@@ -9,7 +9,7 @@ import 'package:path/path.dart' as path;
...
@@ -9,7 +9,7 @@ import 'package:path/path.dart' as path;
import
'run_command.dart'
;
import
'run_command.dart'
;
typedef
ShardRunner
=
Future
<
Null
>
Function
();
typedef
ShardRunner
=
Future
<
void
>
Function
();
final
String
flutterRoot
=
path
.
dirname
(
path
.
dirname
(
path
.
dirname
(
path
.
fromUri
(
Platform
.
script
))));
final
String
flutterRoot
=
path
.
dirname
(
path
.
dirname
(
path
.
dirname
(
path
.
fromUri
(
Platform
.
script
))));
final
String
flutter
=
path
.
join
(
flutterRoot
,
'bin'
,
Platform
.
isWindows
?
'flutter.bat'
:
'flutter'
);
final
String
flutter
=
path
.
join
(
flutterRoot
,
'bin'
,
Platform
.
isWindows
?
'flutter.bat'
:
'flutter'
);
...
@@ -37,7 +37,7 @@ const Duration _kShortTimeout = Duration(minutes: 5);
...
@@ -37,7 +37,7 @@ const Duration _kShortTimeout = Duration(minutes: 5);
/// For example:
/// For example:
/// SHARD=tool_tests bin/cache/dart-sdk/bin/dart dev/bots/test.dart
/// SHARD=tool_tests bin/cache/dart-sdk/bin/dart dev/bots/test.dart
/// bin/cache/dart-sdk/bin/dart dev/bots/test.dart --local-engine=host_debug_unopt
/// bin/cache/dart-sdk/bin/dart dev/bots/test.dart --local-engine=host_debug_unopt
Future
<
Null
>
main
(
List
<
String
>
args
)
async
{
Future
<
void
>
main
(
List
<
String
>
args
)
async
{
flutterTestArgs
.
addAll
(
args
);
flutterTestArgs
.
addAll
(
args
);
final
String
shard
=
Platform
.
environment
[
'SHARD'
];
final
String
shard
=
Platform
.
environment
[
'SHARD'
];
...
@@ -58,7 +58,7 @@ Future<Null> main(List<String> args) async {
...
@@ -58,7 +58,7 @@ Future<Null> main(List<String> args) async {
}
}
}
}
Future
<
Null
>
_runSmokeTests
()
async
{
Future
<
void
>
_runSmokeTests
()
async
{
// Verify that the tests actually return failure on failure and success on
// Verify that the tests actually return failure on failure and success on
// success.
// success.
final
String
automatedTests
=
path
.
join
(
flutterRoot
,
'dev'
,
'automated_tests'
);
final
String
automatedTests
=
path
.
join
(
flutterRoot
,
'dev'
,
'automated_tests'
);
...
@@ -138,7 +138,7 @@ Future<Null> _runSmokeTests() async {
...
@@ -138,7 +138,7 @@ Future<Null> _runSmokeTests() async {
await
_verifyVersion
(
path
.
join
(
flutterRoot
,
'version'
));
await
_verifyVersion
(
path
.
join
(
flutterRoot
,
'version'
));
}
}
Future
<
Null
>
_runToolTests
()
async
{
Future
<
void
>
_runToolTests
()
async
{
await
_runSmokeTests
();
await
_runSmokeTests
();
await
_pubRunTest
(
await
_pubRunTest
(
...
@@ -149,7 +149,7 @@ Future<Null> _runToolTests() async {
...
@@ -149,7 +149,7 @@ Future<Null> _runToolTests() async {
print
(
'
${bold}
DONE: All tests successful.
$reset
'
);
print
(
'
${bold}
DONE: All tests successful.
$reset
'
);
}
}
Future
<
Null
>
_runTests
()
async
{
Future
<
void
>
_runTests
()
async
{
await
_runSmokeTests
();
await
_runSmokeTests
();
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
));
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
));
...
@@ -171,7 +171,7 @@ Future<Null> _runTests() async {
...
@@ -171,7 +171,7 @@ Future<Null> _runTests() async {
print
(
'
${bold}
DONE: All tests successful.
$reset
'
);
print
(
'
${bold}
DONE: All tests successful.
$reset
'
);
}
}
Future
<
Null
>
_runCoverage
()
async
{
Future
<
void
>
_runCoverage
()
async
{
final
File
coverageFile
=
File
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
,
'coverage'
,
'lcov.info'
));
final
File
coverageFile
=
File
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
,
'coverage'
,
'lcov.info'
));
if
(!
coverageFile
.
existsSync
())
{
if
(!
coverageFile
.
existsSync
())
{
print
(
'
${red}
Coverage file not found.
$reset
'
);
print
(
'
${red}
Coverage file not found.
$reset
'
);
...
@@ -193,7 +193,7 @@ Future<Null> _runCoverage() async {
...
@@ -193,7 +193,7 @@ Future<Null> _runCoverage() async {
print
(
'
${bold}
DONE: Coverage collection successful.
$reset
'
);
print
(
'
${bold}
DONE: Coverage collection successful.
$reset
'
);
}
}
Future
<
Null
>
_pubRunTest
(
Future
<
void
>
_pubRunTest
(
String
workingDirectory
,
{
String
workingDirectory
,
{
String
testPath
,
String
testPath
,
bool
enableFlutterToolAsserts
=
false
bool
enableFlutterToolAsserts
=
false
...
@@ -234,7 +234,7 @@ class EvalResult {
...
@@ -234,7 +234,7 @@ class EvalResult {
final
int
exitCode
;
final
int
exitCode
;
}
}
Future
<
Null
>
_runFlutterTest
(
String
workingDirectory
,
{
Future
<
void
>
_runFlutterTest
(
String
workingDirectory
,
{
String
script
,
String
script
,
bool
expectFailure
=
false
,
bool
expectFailure
=
false
,
bool
printOutput
=
true
,
bool
printOutput
=
true
,
...
@@ -268,7 +268,7 @@ Future<Null> _runFlutterTest(String workingDirectory, {
...
@@ -268,7 +268,7 @@ Future<Null> _runFlutterTest(String workingDirectory, {
);
);
}
}
Future
<
Null
>
_verifyVersion
(
String
filename
)
async
{
Future
<
void
>
_verifyVersion
(
String
filename
)
async
{
if
(!
File
(
filename
).
existsSync
())
{
if
(!
File
(
filename
).
existsSync
())
{
print
(
'
$redLine
'
);
print
(
'
$redLine
'
);
print
(
'The version logic failed to create the Flutter version file.'
);
print
(
'The version logic failed to create the Flutter version file.'
);
...
...
dev/devicelab/README.md
View file @
d340e2f2
...
@@ -177,7 +177,7 @@ import 'dart:async';
...
@@ -177,7 +177,7 @@ import 'dart:async';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
await
task
(()
async
{
await
task
(()
async
{
...
do
something
interesting
...
...
do
something
interesting
...
...
...
dev/devicelab/bin/run.dart
View file @
d340e2f2
...
@@ -19,7 +19,7 @@ List<String> _taskNames = <String>[];
...
@@ -19,7 +19,7 @@ List<String> _taskNames = <String>[];
///
///
/// The tasks are chosen depending on the command-line options
/// The tasks are chosen depending on the command-line options
/// (see [_argParser]).
/// (see [_argParser]).
Future
<
Null
>
main
(
List
<
String
>
rawArgs
)
async
{
Future
<
void
>
main
(
List
<
String
>
rawArgs
)
async
{
ArgResults
args
;
ArgResults
args
;
try
{
try
{
args
=
_argParser
.
parse
(
rawArgs
);
args
=
_argParser
.
parse
(
rawArgs
);
...
...
dev/devicelab/bin/tasks/analyzer_benchmark.dart
View file @
d340e2f2
...
@@ -7,6 +7,6 @@ import 'dart:async';
...
@@ -7,6 +7,6 @@ import 'dart:async';
import
'package:flutter_devicelab/tasks/analysis.dart'
;
import
'package:flutter_devicelab/tasks/analysis.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
await
task
(
analyzerBenchmarkTask
);
await
task
(
analyzerBenchmarkTask
);
}
}
dev/devicelab/bin/tasks/android_sample_catalog_generator.dart
View file @
d340e2f2
...
@@ -9,7 +9,7 @@ import 'package:flutter_devicelab/framework/framework.dart';
...
@@ -9,7 +9,7 @@ import 'package:flutter_devicelab/framework/framework.dart';
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:flutter_devicelab/tasks/sample_catalog_generator.dart'
;
import
'package:flutter_devicelab/tasks/sample_catalog_generator.dart'
;
Future
<
Null
>
main
(
List
<
String
>
args
)
async
{
Future
<
void
>
main
(
List
<
String
>
args
)
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(()
=>
samplePageCatalogGenerator
(
extractCloudAuthTokenArg
(
args
)));
await
task
(()
=>
samplePageCatalogGenerator
(
extractCloudAuthTokenArg
(
args
)));
}
}
dev/devicelab/bin/tasks/basic_material_app_android__compile.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createBasicMaterialCompileTest
());
await
task
(
createBasicMaterialCompileTest
());
}
}
dev/devicelab/bin/tasks/basic_material_app_ios__compile.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createBasicMaterialCompileTest
());
await
task
(
createBasicMaterialCompileTest
());
}
}
dev/devicelab/bin/tasks/basic_material_app_win__compile.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createBasicMaterialCompileTest
());
await
task
(
createBasicMaterialCompileTest
());
}
}
dev/devicelab/bin/tasks/channels_integration_test.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createChannelsIntegrationTest
());
await
task
(
createChannelsIntegrationTest
());
}
}
dev/devicelab/bin/tasks/channels_integration_test_ios.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createChannelsIntegrationTest
());
await
task
(
createChannelsIntegrationTest
());
}
}
dev/devicelab/bin/tasks/channels_integration_test_win.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createChannelsIntegrationTest
());
await
task
(
createChannelsIntegrationTest
());
}
}
dev/devicelab/bin/tasks/commands_test.dart
View file @
d340e2f2
...
@@ -21,7 +21,7 @@ void main() {
...
@@ -21,7 +21,7 @@ void main() {
await
device
.
unlock
();
await
device
.
unlock
();
final
Directory
appDir
=
dir
(
path
.
join
(
flutterDirectory
.
path
,
'dev/integration_tests/ui'
));
final
Directory
appDir
=
dir
(
path
.
join
(
flutterDirectory
.
path
,
'dev/integration_tests/ui'
));
await
inDirectory
(
appDir
,
()
async
{
await
inDirectory
(
appDir
,
()
async
{
final
Completer
<
Null
>
ready
=
Completer
<
Null
>();
final
Completer
<
void
>
ready
=
Completer
<
void
>();
bool
ok
;
bool
ok
;
print
(
'run: starting...'
);
print
(
'run: starting...'
);
final
Process
run
=
await
startProcess
(
final
Process
run
=
await
startProcess
(
...
@@ -107,7 +107,7 @@ class DriveHelper {
...
@@ -107,7 +107,7 @@ class DriveHelper {
final
int
vmServicePort
;
final
int
vmServicePort
;
Future
<
Null
>
drive
(
String
name
)
async
{
Future
<
void
>
drive
(
String
name
)
async
{
print
(
'drive: running commands_
$name
check...'
);
print
(
'drive: running commands_
$name
check...'
);
final
Process
drive
=
await
startProcess
(
final
Process
drive
=
await
startProcess
(
path
.
join
(
flutterDirectory
.
path
,
'bin'
,
'flutter'
),
path
.
join
(
flutterDirectory
.
path
,
'bin'
,
'flutter'
),
...
...
dev/devicelab/bin/tasks/complex_layout__start_up.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createComplexLayoutStartupTest
());
await
task
(
createComplexLayoutStartupTest
());
}
}
dev/devicelab/bin/tasks/complex_layout_android__compile.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createComplexLayoutCompileTest
());
await
task
(
createComplexLayoutCompileTest
());
}
}
dev/devicelab/bin/tasks/complex_layout_ios__compile.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createComplexLayoutCompileTest
());
await
task
(
createComplexLayoutCompileTest
());
}
}
dev/devicelab/bin/tasks/complex_layout_ios__start_up.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createComplexLayoutStartupTest
());
await
task
(
createComplexLayoutStartupTest
());
}
}
dev/devicelab/bin/tasks/complex_layout_scroll_perf__memory.dart
View file @
d340e2f2
...
@@ -9,7 +9,7 @@ import 'package:flutter_devicelab/framework/framework.dart';
...
@@ -9,7 +9,7 @@ import 'package:flutter_devicelab/framework/framework.dart';
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
MemoryTest
(
await
task
(
MemoryTest
(
'
${flutterDirectory.path}
/dev/benchmarks/complex_layout'
,
'
${flutterDirectory.path}
/dev/benchmarks/complex_layout'
,
...
...
dev/devicelab/bin/tasks/complex_layout_scroll_perf__timeline_summary.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createComplexLayoutScrollPerfTest
());
await
task
(
createComplexLayoutScrollPerfTest
());
}
}
dev/devicelab/bin/tasks/complex_layout_scroll_perf_ios__timeline_summary.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createComplexLayoutScrollPerfTest
());
await
task
(
createComplexLayoutScrollPerfTest
());
}
}
dev/devicelab/bin/tasks/complex_layout_win__compile.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createComplexLayoutCompileTest
());
await
task
(
createComplexLayoutCompileTest
());
}
}
dev/devicelab/bin/tasks/dartdocs.dart
View file @
d340e2f2
...
@@ -10,7 +10,7 @@ import 'package:flutter_devicelab/framework/framework.dart';
...
@@ -10,7 +10,7 @@ import 'package:flutter_devicelab/framework/framework.dart';
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:path/path.dart'
as
path
;
import
'package:path/path.dart'
as
path
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
await
task
(()
async
{
await
task
(()
async
{
final
Stopwatch
clock
=
Stopwatch
()..
start
();
final
Stopwatch
clock
=
Stopwatch
()..
start
();
final
Process
analysis
=
await
startProcess
(
final
Process
analysis
=
await
startProcess
(
...
...
dev/devicelab/bin/tasks/embedded_android_views_integration_test.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createEmbeddedAndroidViewsIntegrationTest
());
await
task
(
createEmbeddedAndroidViewsIntegrationTest
());
}
}
dev/devicelab/bin/tasks/external_ui_integration_test.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createExternalUiIntegrationTest
());
await
task
(
createExternalUiIntegrationTest
());
}
}
dev/devicelab/bin/tasks/external_ui_integration_test_ios.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createExternalUiIntegrationTest
());
await
task
(
createExternalUiIntegrationTest
());
}
}
dev/devicelab/bin/tasks/flavors_test.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createFlavorsTest
());
await
task
(
createFlavorsTest
());
}
}
dev/devicelab/bin/tasks/flavors_test_ios.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createFlavorsTest
());
await
task
(
createFlavorsTest
());
}
}
dev/devicelab/bin/tasks/flavors_test_win.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createFlavorsTest
());
await
task
(
createFlavorsTest
());
}
}
dev/devicelab/bin/tasks/flutter_attach_test.dart
View file @
d340e2f2
...
@@ -13,11 +13,11 @@ import 'package:flutter_devicelab/framework/utils.dart';
...
@@ -13,11 +13,11 @@ import 'package:flutter_devicelab/framework/utils.dart';
Future
<
void
>
testReload
(
Process
process
,
{
Future
<
void
>
Function
()
onListening
})
async
{
Future
<
void
>
testReload
(
Process
process
,
{
Future
<
void
>
Function
()
onListening
})
async
{
section
(
'Testing hot reload, restart and quit'
);
section
(
'Testing hot reload, restart and quit'
);
final
Completer
<
Null
>
listening
=
Completer
<
Null
>();
final
Completer
<
void
>
listening
=
Completer
<
void
>();
final
Completer
<
Null
>
ready
=
Completer
<
Null
>();
final
Completer
<
void
>
ready
=
Completer
<
void
>();
final
Completer
<
Null
>
reloaded
=
Completer
<
Null
>();
final
Completer
<
void
>
reloaded
=
Completer
<
void
>();
final
Completer
<
Null
>
restarted
=
Completer
<
Null
>();
final
Completer
<
void
>
restarted
=
Completer
<
void
>();
final
Completer
<
Null
>
finished
=
Completer
<
Null
>();
final
Completer
<
void
>
finished
=
Completer
<
void
>();
final
List
<
String
>
stdout
=
<
String
>[];
final
List
<
String
>
stdout
=
<
String
>[];
final
List
<
String
>
stderr
=
<
String
>[];
final
List
<
String
>
stderr
=
<
String
>[];
...
@@ -52,7 +52,7 @@ Future<void> testReload(Process process, { Future<void> Function() onListening }
...
@@ -52,7 +52,7 @@ Future<void> testReload(Process process, { Future<void> Function() onListening }
process
.
exitCode
.
then
<
void
>((
int
processExitCode
)
{
exitCode
=
processExitCode
;
});
process
.
exitCode
.
then
<
void
>((
int
processExitCode
)
{
exitCode
=
processExitCode
;
});
Future
<
dynamic
>
eventOrExit
(
Future
<
Null
>
event
)
{
Future
<
dynamic
>
eventOrExit
(
Future
<
void
>
event
)
{
return
Future
.
any
<
dynamic
>(<
Future
<
dynamic
>>[
event
,
process
.
exitCode
]);
return
Future
.
any
<
dynamic
>(<
Future
<
dynamic
>>[
event
,
process
.
exitCode
]);
}
}
...
@@ -116,7 +116,7 @@ void main() {
...
@@ -116,7 +116,7 @@ void main() {
});
});
// Give the device the time to really shut down the app.
// Give the device the time to really shut down the app.
await
Future
<
Null
>.
delayed
(
const
Duration
(
milliseconds:
200
));
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
200
));
// After the delay, force-stopping it shouldn't do anything, but doesn't hurt.
// After the delay, force-stopping it shouldn't do anything, but doesn't hurt.
await
device
.
shellExec
(
'am'
,
<
String
>[
'force-stop'
,
kAppId
]);
await
device
.
shellExec
(
'am'
,
<
String
>[
'force-stop'
,
kAppId
]);
...
...
dev/devicelab/bin/tasks/flutter_gallery__back_button_memory.dart
View file @
d340e2f2
...
@@ -35,7 +35,7 @@ class BackButtonMemoryTest extends MemoryTest {
...
@@ -35,7 +35,7 @@ class BackButtonMemoryTest extends MemoryTest {
await
receivedNextMessage
;
await
receivedNextMessage
;
// Give Android time to settle (e.g. run GCs) after closing the app.
// Give Android time to settle (e.g. run GCs) after closing the app.
await
Future
<
Null
>.
delayed
(
const
Duration
(
milliseconds:
100
));
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
100
));
// Relaunch the app, wait for it to launch.
// Relaunch the app, wait for it to launch.
prepareForNextMessage
(
'READY'
);
prepareForNextMessage
(
'READY'
);
...
@@ -46,13 +46,13 @@ class BackButtonMemoryTest extends MemoryTest {
...
@@ -46,13 +46,13 @@ class BackButtonMemoryTest extends MemoryTest {
await
receivedNextMessage
;
await
receivedNextMessage
;
// Wait for the Flutter app to settle (e.g. run GCs).
// Wait for the Flutter app to settle (e.g. run GCs).
await
Future
<
Null
>.
delayed
(
const
Duration
(
milliseconds:
100
));
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
100
));
}
}
await
recordEnd
();
await
recordEnd
();
}
}
}
}
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
BackButtonMemoryTest
().
run
);
await
task
(
BackButtonMemoryTest
().
run
);
}
}
dev/devicelab/bin/tasks/flutter_gallery__memory_nav.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/framework.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/framework.dart';
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
await
task
(
MemoryTest
(
await
task
(
MemoryTest
(
'
${flutterDirectory.path}
/examples/flutter_gallery'
,
'
${flutterDirectory.path}
/examples/flutter_gallery'
,
'test_memory/memory_nav.dart'
,
'test_memory/memory_nav.dart'
,
...
...
dev/devicelab/bin/tasks/flutter_gallery__start_up.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createFlutterGalleryStartupTest
());
await
task
(
createFlutterGalleryStartupTest
());
}
}
dev/devicelab/bin/tasks/flutter_gallery__transition_perf.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/gallery.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/gallery.dart';
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createGalleryTransitionTest
());
await
task
(
createGalleryTransitionTest
());
}
}
dev/devicelab/bin/tasks/flutter_gallery__transition_perf_with_semantics.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/gallery.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/gallery.dart';
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(()
async
{
await
task
(()
async
{
final
TaskResult
withoutSemantics
=
await
createGalleryTransitionTest
()();
final
TaskResult
withoutSemantics
=
await
createGalleryTransitionTest
()();
...
...
dev/devicelab/bin/tasks/flutter_gallery_android__compile.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createFlutterGalleryCompileTest
());
await
task
(
createFlutterGalleryCompileTest
());
}
}
dev/devicelab/bin/tasks/flutter_gallery_instrumentation_test.dart
View file @
d340e2f2
...
@@ -13,7 +13,7 @@ import 'package:flutter_devicelab/framework/utils.dart';
...
@@ -13,7 +13,7 @@ import 'package:flutter_devicelab/framework/utils.dart';
// with the Java code to report its status. If this test fails due to a problem on the Dart
// with the Java code to report its status. If this test fails due to a problem on the Dart
// side, you can debug that by just running that file directly using `flutter run`.
// side, you can debug that by just running that file directly using `flutter run`.
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(()
async
{
await
task
(()
async
{
...
...
dev/devicelab/bin/tasks/flutter_gallery_ios32__start_up.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createFlutterGalleryStartupTest
());
await
task
(
createFlutterGalleryStartupTest
());
}
}
dev/devicelab/bin/tasks/flutter_gallery_ios32__transition_perf.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/gallery.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/gallery.dart';
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createGalleryTransitionTest
());
await
task
(
createGalleryTransitionTest
());
}
}
dev/devicelab/bin/tasks/flutter_gallery_ios__compile.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createFlutterGalleryCompileTest
());
await
task
(
createFlutterGalleryCompileTest
());
}
}
dev/devicelab/bin/tasks/flutter_gallery_ios__start_up.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createFlutterGalleryStartupTest
());
await
task
(
createFlutterGalleryStartupTest
());
}
}
dev/devicelab/bin/tasks/flutter_gallery_ios__transition_perf.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/gallery.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/gallery.dart';
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createGalleryTransitionTest
());
await
task
(
createGalleryTransitionTest
());
}
}
dev/devicelab/bin/tasks/flutter_gallery_win__compile.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createFlutterGalleryCompileTest
());
await
task
(
createFlutterGalleryCompileTest
());
}
}
dev/devicelab/bin/tasks/flutter_view__start_up.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createFlutterViewStartupTest
());
await
task
(
createFlutterViewStartupTest
());
}
}
dev/devicelab/bin/tasks/flutter_view_ios__start_up.dart
View file @
d340e2f2
...
@@ -10,7 +10,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
...
@@ -10,7 +10,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(()
async
{
await
task
(()
async
{
final
Directory
iosDirectory
=
dir
(
final
Directory
iosDirectory
=
dir
(
...
...
dev/devicelab/bin/tasks/gradle_plugin_test.dart
View file @
d340e2f2
...
@@ -166,7 +166,7 @@ class FlutterProject {
...
@@ -166,7 +166,7 @@ class FlutterProject {
String
get
rootPath
=>
path
.
join
(
parent
.
path
,
name
);
String
get
rootPath
=>
path
.
join
(
parent
.
path
,
name
);
String
get
androidPath
=>
path
.
join
(
rootPath
,
'android'
);
String
get
androidPath
=>
path
.
join
(
rootPath
,
'android'
);
Future
<
Null
>
addCustomBuildType
(
String
name
,
{
String
initWith
})
async
{
Future
<
void
>
addCustomBuildType
(
String
name
,
{
String
initWith
})
async
{
final
File
buildScript
=
File
(
final
File
buildScript
=
File
(
path
.
join
(
androidPath
,
'app'
,
'build.gradle'
),
path
.
join
(
androidPath
,
'app'
,
'build.gradle'
),
);
);
...
@@ -183,7 +183,7 @@ android {
...
@@ -183,7 +183,7 @@ android {
'''
);
'''
);
}
}
Future
<
Null
>
addProductFlavor
(
String
name
)
async
{
Future
<
void
>
addProductFlavor
(
String
name
)
async
{
final
File
buildScript
=
File
(
final
File
buildScript
=
File
(
path
.
join
(
androidPath
,
'app'
,
'build.gradle'
),
path
.
join
(
androidPath
,
'app'
,
'build.gradle'
),
);
);
...
@@ -202,14 +202,14 @@ android {
...
@@ -202,14 +202,14 @@ android {
'''
);
'''
);
}
}
Future
<
Null
>
introduceError
()
async
{
Future
<
void
>
introduceError
()
async
{
final
File
buildScript
=
File
(
final
File
buildScript
=
File
(
path
.
join
(
androidPath
,
'app'
,
'build.gradle'
),
path
.
join
(
androidPath
,
'app'
,
'build.gradle'
),
);
);
await
buildScript
.
writeAsString
((
await
buildScript
.
readAsString
()).
replaceAll
(
'buildTypes'
,
'builTypes'
));
await
buildScript
.
writeAsString
((
await
buildScript
.
readAsString
()).
replaceAll
(
'buildTypes'
,
'builTypes'
));
}
}
Future
<
Null
>
runGradleTask
(
String
task
,
{
List
<
String
>
options
})
async
{
Future
<
void
>
runGradleTask
(
String
task
,
{
List
<
String
>
options
})
async
{
return
_runGradleTask
(
workingDirectory:
androidPath
,
task:
task
,
options:
options
);
return
_runGradleTask
(
workingDirectory:
androidPath
,
task:
task
,
options:
options
);
}
}
...
@@ -244,14 +244,14 @@ class FlutterPluginProject {
...
@@ -244,14 +244,14 @@ class FlutterPluginProject {
String
get
exampleAndroidPath
=>
path
.
join
(
examplePath
,
'android'
);
String
get
exampleAndroidPath
=>
path
.
join
(
examplePath
,
'android'
);
String
get
debugApkPath
=>
path
.
join
(
examplePath
,
'build'
,
'app'
,
'outputs'
,
'apk'
,
'debug'
,
'app-debug.apk'
);
String
get
debugApkPath
=>
path
.
join
(
examplePath
,
'build'
,
'app'
,
'outputs'
,
'apk'
,
'debug'
,
'app-debug.apk'
);
Future
<
Null
>
runGradleTask
(
String
task
,
{
List
<
String
>
options
})
async
{
Future
<
void
>
runGradleTask
(
String
task
,
{
List
<
String
>
options
})
async
{
return
_runGradleTask
(
workingDirectory:
exampleAndroidPath
,
task:
task
,
options:
options
);
return
_runGradleTask
(
workingDirectory:
exampleAndroidPath
,
task:
task
,
options:
options
);
}
}
bool
get
hasDebugApk
=>
File
(
debugApkPath
).
existsSync
();
bool
get
hasDebugApk
=>
File
(
debugApkPath
).
existsSync
();
}
}
Future
<
Null
>
_runGradleTask
({
String
workingDirectory
,
String
task
,
List
<
String
>
options
})
async
{
Future
<
void
>
_runGradleTask
({
String
workingDirectory
,
String
task
,
List
<
String
>
options
})
async
{
final
ProcessResult
result
=
await
_resultOfGradleTask
(
final
ProcessResult
result
=
await
_resultOfGradleTask
(
workingDirectory:
workingDirectory
,
workingDirectory:
workingDirectory
,
task:
task
,
task:
task
,
...
...
dev/devicelab/bin/tasks/hello_world__memory.dart
View file @
d340e2f2
...
@@ -27,13 +27,13 @@ class HelloWorldMemoryTest extends MemoryTest {
...
@@ -27,13 +27,13 @@ class HelloWorldMemoryTest extends MemoryTest {
'-d'
,
device
.
deviceId
,
'-d'
,
device
.
deviceId
,
test
,
test
,
]);
]);
await
Future
<
Null
>.
delayed
(
const
Duration
(
milliseconds:
1500
));
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
1500
));
await
recordStart
();
await
recordStart
();
await
Future
<
Null
>.
delayed
(
const
Duration
(
milliseconds:
3000
));
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
3000
));
await
recordEnd
();
await
recordEnd
();
}
}
}
}
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
await
task
(
HelloWorldMemoryTest
().
run
);
await
task
(
HelloWorldMemoryTest
().
run
);
}
}
dev/devicelab/bin/tasks/hello_world_android__compile.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createHelloWorldCompileTest
());
await
task
(
createHelloWorldCompileTest
());
}
}
dev/devicelab/bin/tasks/hello_world_ios__compile.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createHelloWorldCompileTest
());
await
task
(
createHelloWorldCompileTest
());
}
}
dev/devicelab/bin/tasks/hot_mode_dev_cycle__benchmark.dart
View file @
d340e2f2
...
@@ -7,6 +7,6 @@ import 'dart:async';
...
@@ -7,6 +7,6 @@ import 'dart:async';
import
'package:flutter_devicelab/tasks/hot_mode_tests.dart'
;
import
'package:flutter_devicelab/tasks/hot_mode_tests.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
await
task
(
createHotModeTest
());
await
task
(
createHotModeTest
());
}
}
dev/devicelab/bin/tasks/hot_mode_dev_cycle_linux__benchmark.dart
View file @
d340e2f2
...
@@ -7,6 +7,6 @@ import 'dart:async';
...
@@ -7,6 +7,6 @@ import 'dart:async';
import
'package:flutter_devicelab/tasks/hot_mode_tests.dart'
;
import
'package:flutter_devicelab/tasks/hot_mode_tests.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
await
task
(
createHotModeTest
());
await
task
(
createHotModeTest
());
}
}
dev/devicelab/bin/tasks/hot_mode_dev_cycle_win__benchmark.dart
View file @
d340e2f2
...
@@ -7,6 +7,6 @@ import 'dart:async';
...
@@ -7,6 +7,6 @@ import 'dart:async';
import
'package:flutter_devicelab/tasks/hot_mode_tests.dart'
;
import
'package:flutter_devicelab/tasks/hot_mode_tests.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
await
task
(
createHotModeTest
());
await
task
(
createHotModeTest
());
}
}
dev/devicelab/bin/tasks/integration_ui.dart
View file @
d340e2f2
...
@@ -9,7 +9,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -9,7 +9,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
/// End to end tests for Android.
/// End to end tests for Android.
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
runEndToEndTests
);
await
task
(
runEndToEndTests
);
}
}
dev/devicelab/bin/tasks/integration_ui_ios.dart
View file @
d340e2f2
...
@@ -9,7 +9,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -9,7 +9,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
/// End to end tests for iOS.
/// End to end tests for iOS.
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
runEndToEndTests
);
await
task
(
runEndToEndTests
);
}
}
dev/devicelab/bin/tasks/ios_sample_catalog_generator.dart
View file @
d340e2f2
...
@@ -9,7 +9,7 @@ import 'package:flutter_devicelab/framework/framework.dart';
...
@@ -9,7 +9,7 @@ import 'package:flutter_devicelab/framework/framework.dart';
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:flutter_devicelab/tasks/sample_catalog_generator.dart'
;
import
'package:flutter_devicelab/tasks/sample_catalog_generator.dart'
;
Future
<
Null
>
main
(
List
<
String
>
args
)
async
{
Future
<
void
>
main
(
List
<
String
>
args
)
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(()
=>
samplePageCatalogGenerator
(
extractCloudAuthTokenArg
(
args
)));
await
task
(()
=>
samplePageCatalogGenerator
(
extractCloudAuthTokenArg
(
args
)));
}
}
dev/devicelab/bin/tasks/microbenchmarks.dart
View file @
d340e2f2
...
@@ -9,7 +9,7 @@ import 'package:flutter_devicelab/framework/framework.dart';
...
@@ -9,7 +9,7 @@ import 'package:flutter_devicelab/framework/framework.dart';
import
'package:flutter_devicelab/tasks/microbenchmarks.dart'
;
import
'package:flutter_devicelab/tasks/microbenchmarks.dart'
;
/// Runs microbenchmarks on Android.
/// Runs microbenchmarks on Android.
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createMicrobenchmarkTask
());
await
task
(
createMicrobenchmarkTask
());
}
}
dev/devicelab/bin/tasks/microbenchmarks_ios.dart
View file @
d340e2f2
...
@@ -9,7 +9,7 @@ import 'package:flutter_devicelab/framework/framework.dart';
...
@@ -9,7 +9,7 @@ import 'package:flutter_devicelab/framework/framework.dart';
import
'package:flutter_devicelab/tasks/microbenchmarks.dart'
;
import
'package:flutter_devicelab/tasks/microbenchmarks.dart'
;
/// Runs microbenchmarks on iOS.
/// Runs microbenchmarks on iOS.
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createMicrobenchmarkTask
());
await
task
(
createMicrobenchmarkTask
());
}
}
dev/devicelab/bin/tasks/module_test.dart
View file @
d340e2f2
...
@@ -11,7 +11,7 @@ import 'package:path/path.dart' as path;
...
@@ -11,7 +11,7 @@ import 'package:path/path.dart' as path;
/// Tests that the Flutter module project template works and supports
/// Tests that the Flutter module project template works and supports
/// adding Flutter to an existing Android app.
/// adding Flutter to an existing Android app.
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
await
task
(()
async
{
await
task
(()
async
{
section
(
'Find Java'
);
section
(
'Find Java'
);
...
...
dev/devicelab/bin/tasks/module_test_ios.dart
View file @
d340e2f2
...
@@ -12,7 +12,7 @@ import 'package:path/path.dart' as path;
...
@@ -12,7 +12,7 @@ import 'package:path/path.dart' as path;
/// Tests that the Flutter module project template works and supports
/// Tests that the Flutter module project template works and supports
/// adding Flutter to an existing iOS app.
/// adding Flutter to an existing iOS app.
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
await
task
(()
async
{
await
task
(()
async
{
section
(
'Create Flutter module project'
);
section
(
'Create Flutter module project'
);
...
...
dev/devicelab/bin/tasks/platform_channel_sample_test.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createPlatformChannelSampleTest
());
await
task
(
createPlatformChannelSampleTest
());
}
}
dev/devicelab/bin/tasks/platform_channel_sample_test_ios.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createPlatformChannelSampleTest
());
await
task
(
createPlatformChannelSampleTest
());
}
}
dev/devicelab/bin/tasks/platform_interaction_test.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createPlatformInteractionTest
());
await
task
(
createPlatformInteractionTest
());
}
}
dev/devicelab/bin/tasks/platform_interaction_test_ios.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/framework/adb.dart';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createPlatformInteractionTest
());
await
task
(
createPlatformInteractionTest
());
}
}
dev/devicelab/bin/tasks/platform_view__start_up.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createPlatformViewStartupTest
());
await
task
(
createPlatformViewStartupTest
());
}
}
dev/devicelab/bin/tasks/platform_view_ios__start_up.dart
View file @
d340e2f2
...
@@ -10,7 +10,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
...
@@ -10,7 +10,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(()
async
{
await
task
(()
async
{
final
Directory
iosDirectory
=
dir
(
final
Directory
iosDirectory
=
dir
(
...
...
dev/devicelab/bin/tasks/plugin_test.dart
View file @
d340e2f2
...
@@ -7,7 +7,7 @@ import 'dart:async';
...
@@ -7,7 +7,7 @@ import 'dart:async';
import
'package:flutter_devicelab/tasks/plugin_tests.dart'
;
import
'package:flutter_devicelab/tasks/plugin_tests.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
await
task
(
combine
(<
TaskFunction
>[
await
task
(
combine
(<
TaskFunction
>[
PluginTest
(
'apk'
,
<
String
>[
'-a'
,
'java'
]),
PluginTest
(
'apk'
,
<
String
>[
'-a'
,
'java'
]),
PluginTest
(
'apk'
,
<
String
>[
'-a'
,
'kotlin'
]),
PluginTest
(
'apk'
,
<
String
>[
'-a'
,
'kotlin'
]),
...
...
dev/devicelab/bin/tasks/plugin_test_ios.dart
View file @
d340e2f2
...
@@ -7,7 +7,7 @@ import 'dart:async';
...
@@ -7,7 +7,7 @@ import 'dart:async';
import
'package:flutter_devicelab/tasks/plugin_tests.dart'
;
import
'package:flutter_devicelab/tasks/plugin_tests.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
await
task
(
combine
(<
TaskFunction
>[
await
task
(
combine
(<
TaskFunction
>[
PluginTest
(
'ios'
,
<
String
>[
'-i'
,
'objc'
]),
PluginTest
(
'ios'
,
<
String
>[
'-i'
,
'objc'
]),
PluginTest
(
'ios'
,
<
String
>[
'-i'
,
'swift'
]),
PluginTest
(
'ios'
,
<
String
>[
'-i'
,
'swift'
]),
...
...
dev/devicelab/bin/tasks/plugin_test_win.dart
View file @
d340e2f2
...
@@ -7,7 +7,7 @@ import 'dart:async';
...
@@ -7,7 +7,7 @@ import 'dart:async';
import
'package:flutter_devicelab/tasks/plugin_tests.dart'
;
import
'package:flutter_devicelab/tasks/plugin_tests.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
await
task
(
combine
(<
TaskFunction
>[
await
task
(
combine
(<
TaskFunction
>[
PluginTest
(
'apk'
,
<
String
>[
'-a'
,
'java'
]),
PluginTest
(
'apk'
,
<
String
>[
'-a'
,
'java'
]),
PluginTest
(
'apk'
,
<
String
>[
'-a'
,
'kotlin'
]),
PluginTest
(
'apk'
,
<
String
>[
'-a'
,
'kotlin'
]),
...
...
dev/devicelab/bin/tasks/routing_test.dart
View file @
d340e2f2
...
@@ -29,7 +29,7 @@ void main() {
...
@@ -29,7 +29,7 @@ void main() {
});
});
section
(
'TEST WHETHER `flutter run --route` WORKS'
);
section
(
'TEST WHETHER `flutter run --route` WORKS'
);
await
inDirectory
(
appDir
,
()
async
{
await
inDirectory
(
appDir
,
()
async
{
final
Completer
<
Null
>
ready
=
Completer
<
Null
>();
final
Completer
<
void
>
ready
=
Completer
<
void
>();
bool
ok
;
bool
ok
;
print
(
'run: starting...'
);
print
(
'run: starting...'
);
final
Process
run
=
await
startProcess
(
final
Process
run
=
await
startProcess
(
...
...
dev/devicelab/bin/tasks/run_machine_concurrent_hot_reload.dart
View file @
d340e2f2
...
@@ -39,7 +39,7 @@ void main() {
...
@@ -39,7 +39,7 @@ void main() {
final
Directory
appDir
=
final
Directory
appDir
=
dir
(
path
.
join
(
flutterDirectory
.
path
,
'dev/integration_tests/ui'
));
dir
(
path
.
join
(
flutterDirectory
.
path
,
'dev/integration_tests/ui'
));
await
inDirectory
(
appDir
,
()
async
{
await
inDirectory
(
appDir
,
()
async
{
final
Completer
<
Null
>
ready
=
Completer
<
Null
>();
final
Completer
<
void
>
ready
=
Completer
<
void
>();
bool
ok
;
bool
ok
;
print
(
'run: starting...'
);
print
(
'run: starting...'
);
final
Process
run
=
await
startProcess
(
final
Process
run
=
await
startProcess
(
...
...
dev/devicelab/bin/tasks/run_release_test.dart
View file @
d340e2f2
...
@@ -18,7 +18,7 @@ void main() {
...
@@ -18,7 +18,7 @@ void main() {
await
device
.
unlock
();
await
device
.
unlock
();
final
Directory
appDir
=
dir
(
path
.
join
(
flutterDirectory
.
path
,
'dev/integration_tests/ui'
));
final
Directory
appDir
=
dir
(
path
.
join
(
flutterDirectory
.
path
,
'dev/integration_tests/ui'
));
await
inDirectory
(
appDir
,
()
async
{
await
inDirectory
(
appDir
,
()
async
{
final
Completer
<
Null
>
ready
=
Completer
<
Null
>();
final
Completer
<
void
>
ready
=
Completer
<
void
>();
print
(
'run: starting...'
);
print
(
'run: starting...'
);
final
Process
run
=
await
startProcess
(
final
Process
run
=
await
startProcess
(
path
.
join
(
flutterDirectory
.
path
,
'bin'
,
'flutter'
),
path
.
join
(
flutterDirectory
.
path
,
'bin'
,
'flutter'
),
...
...
dev/devicelab/bin/tasks/service_extensions_test.dart
View file @
d340e2f2
...
@@ -21,7 +21,7 @@ void main() {
...
@@ -21,7 +21,7 @@ void main() {
await
device
.
unlock
();
await
device
.
unlock
();
final
Directory
appDir
=
dir
(
path
.
join
(
flutterDirectory
.
path
,
'dev/integration_tests/ui'
));
final
Directory
appDir
=
dir
(
path
.
join
(
flutterDirectory
.
path
,
'dev/integration_tests/ui'
));
await
inDirectory
(
appDir
,
()
async
{
await
inDirectory
(
appDir
,
()
async
{
final
Completer
<
Null
>
ready
=
Completer
<
Null
>();
final
Completer
<
void
>
ready
=
Completer
<
void
>();
bool
ok
;
bool
ok
;
print
(
'run: starting...'
);
print
(
'run: starting...'
);
final
Process
run
=
await
startProcess
(
final
Process
run
=
await
startProcess
(
...
...
dev/devicelab/bin/tasks/smoke_test_failure.dart
View file @
d340e2f2
...
@@ -7,7 +7,7 @@ import 'dart:async';
...
@@ -7,7 +7,7 @@ import 'dart:async';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
/// Smoke test of a task that fails by returning an unsuccessful response.
/// Smoke test of a task that fails by returning an unsuccessful response.
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
await
task
(()
async
{
await
task
(()
async
{
return
TaskResult
.
failure
(
'Failed'
);
return
TaskResult
.
failure
(
'Failed'
);
});
});
...
...
dev/devicelab/bin/tasks/smoke_test_setup_failure.dart
View file @
d340e2f2
...
@@ -10,4 +10,4 @@ import 'dart:async';
...
@@ -10,4 +10,4 @@ import 'dart:async';
/// therefore will not accept requests to run tasks. When the runner attempts to
/// therefore will not accept requests to run tasks. When the runner attempts to
/// connect and run the test it will receive a "method not found" error from the
/// connect and run the test it will receive a "method not found" error from the
/// VM service, will likely retry and finally time out.
/// VM service, will likely retry and finally time out.
Future
<
Null
>
main
()
async
{}
Future
<
void
>
main
()
async
{}
dev/devicelab/bin/tasks/smoke_test_success.dart
View file @
d340e2f2
...
@@ -7,7 +7,7 @@ import 'dart:async';
...
@@ -7,7 +7,7 @@ import 'dart:async';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
/// Smoke test of a successful task.
/// Smoke test of a successful task.
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
await
task
(()
async
{
await
task
(()
async
{
return
TaskResult
.
success
(<
String
,
dynamic
>{});
return
TaskResult
.
success
(<
String
,
dynamic
>{});
});
});
...
...
dev/devicelab/bin/tasks/smoke_test_throws.dart
View file @
d340e2f2
...
@@ -7,7 +7,7 @@ import 'dart:async';
...
@@ -7,7 +7,7 @@ import 'dart:async';
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
/// Smoke test of a task that fails with an exception.
/// Smoke test of a task that fails with an exception.
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
await
task
(()
async
{
await
task
(()
async
{
throw
'failed'
;
throw
'failed'
;
});
});
...
...
dev/devicelab/bin/tasks/technical_debt__cost.dart
View file @
d340e2f2
...
@@ -76,7 +76,7 @@ Future<int> countDependencies() async {
...
@@ -76,7 +76,7 @@ Future<int> countDependencies() async {
const
String
_kCostBenchmarkKey
=
'technical_debt_in_dollars'
;
const
String
_kCostBenchmarkKey
=
'technical_debt_in_dollars'
;
const
String
_kNumberOfDependenciesKey
=
'dependencies_count'
;
const
String
_kNumberOfDependenciesKey
=
'dependencies_count'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
await
task
(()
async
{
await
task
(()
async
{
return
TaskResult
.
success
(
return
TaskResult
.
success
(
<
String
,
dynamic
>{
<
String
,
dynamic
>{
...
...
dev/devicelab/bin/tasks/tiles_scroll_perf__timeline_summary.dart
View file @
d340e2f2
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
...
@@ -8,7 +8,7 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createTilesScrollPerfTest
());
await
task
(
createTilesScrollPerfTest
());
}
}
...
...
dev/devicelab/lib/framework/adb.dart
View file @
d340e2f2
...
@@ -39,7 +39,7 @@ abstract class DeviceDiscovery {
...
@@ -39,7 +39,7 @@ abstract class DeviceDiscovery {
///
///
/// Calling this method does not guarantee that the same device will be
/// Calling this method does not guarantee that the same device will be
/// returned. For such behavior see [workingDevice].
/// returned. For such behavior see [workingDevice].
Future
<
Null
>
chooseWorkingDevice
();
Future
<
void
>
chooseWorkingDevice
();
/// A device to work with.
/// A device to work with.
///
///
...
@@ -55,7 +55,7 @@ abstract class DeviceDiscovery {
...
@@ -55,7 +55,7 @@ abstract class DeviceDiscovery {
Future
<
Map
<
String
,
HealthCheckResult
>>
checkDevices
();
Future
<
Map
<
String
,
HealthCheckResult
>>
checkDevices
();
/// Prepares the system to run tasks.
/// Prepares the system to run tasks.
Future
<
Null
>
performPreflightTasks
();
Future
<
void
>
performPreflightTasks
();
}
}
/// A proxy for one specific device.
/// A proxy for one specific device.
...
@@ -70,21 +70,21 @@ abstract class Device {
...
@@ -70,21 +70,21 @@ abstract class Device {
Future
<
bool
>
isAsleep
();
Future
<
bool
>
isAsleep
();
/// Wake up the device if it is not awake.
/// Wake up the device if it is not awake.
Future
<
Null
>
wakeUp
();
Future
<
void
>
wakeUp
();
/// Send the device to sleep mode.
/// Send the device to sleep mode.
Future
<
Null
>
sendToSleep
();
Future
<
void
>
sendToSleep
();
/// Emulates pressing the power button, toggling the device's on/off state.
/// Emulates pressing the power button, toggling the device's on/off state.
Future
<
Null
>
togglePower
();
Future
<
void
>
togglePower
();
/// Unlocks the device.
/// Unlocks the device.
///
///
/// Assumes the device doesn't have a secure unlock pattern.
/// Assumes the device doesn't have a secure unlock pattern.
Future
<
Null
>
unlock
();
Future
<
void
>
unlock
();
/// Emulate a tap on the touch screen.
/// Emulate a tap on the touch screen.
Future
<
Null
>
tap
(
int
x
,
int
y
);
Future
<
void
>
tap
(
int
x
,
int
y
);
/// Read memory statistics for a process.
/// Read memory statistics for a process.
Future
<
Map
<
String
,
dynamic
>>
getMemoryStats
(
String
packageName
);
Future
<
Map
<
String
,
dynamic
>>
getMemoryStats
(
String
packageName
);
...
@@ -96,7 +96,7 @@ abstract class Device {
...
@@ -96,7 +96,7 @@ abstract class Device {
Stream
<
String
>
get
logcat
;
Stream
<
String
>
get
logcat
;
/// Stop a process.
/// Stop a process.
Future
<
Null
>
stop
(
String
packageName
);
Future
<
void
>
stop
(
String
packageName
);
}
}
class
AndroidDeviceDiscovery
implements
DeviceDiscovery
{
class
AndroidDeviceDiscovery
implements
DeviceDiscovery
{
...
@@ -127,7 +127,7 @@ class AndroidDeviceDiscovery implements DeviceDiscovery {
...
@@ -127,7 +127,7 @@ class AndroidDeviceDiscovery implements DeviceDiscovery {
/// Picks a random Android device out of connected devices and sets it as
/// Picks a random Android device out of connected devices and sets it as
/// [workingDevice].
/// [workingDevice].
@override
@override
Future
<
Null
>
chooseWorkingDevice
()
async
{
Future
<
void
>
chooseWorkingDevice
()
async
{
final
List
<
Device
>
allDevices
=
(
await
discoverDevices
())
final
List
<
Device
>
allDevices
=
(
await
discoverDevices
())
.
map
<
Device
>((
String
id
)
=>
AndroidDevice
(
deviceId:
id
))
.
map
<
Device
>((
String
id
)
=>
AndroidDevice
(
deviceId:
id
))
.
toList
();
.
toList
();
...
@@ -187,7 +187,7 @@ class AndroidDeviceDiscovery implements DeviceDiscovery {
...
@@ -187,7 +187,7 @@ class AndroidDeviceDiscovery implements DeviceDiscovery {
}
}
@override
@override
Future
<
Null
>
performPreflightTasks
()
async
{
Future
<
void
>
performPreflightTasks
()
async
{
// Kills the `adb` server causing it to start a new instance upon next
// Kills the `adb` server causing it to start a new instance upon next
// command.
// command.
//
//
...
@@ -218,14 +218,14 @@ class AndroidDevice implements Device {
...
@@ -218,14 +218,14 @@ class AndroidDevice implements Device {
/// Wake up the device if it is not awake using [togglePower].
/// Wake up the device if it is not awake using [togglePower].
@override
@override
Future
<
Null
>
wakeUp
()
async
{
Future
<
void
>
wakeUp
()
async
{
if
(!(
await
isAwake
()))
if
(!(
await
isAwake
()))
await
togglePower
();
await
togglePower
();
}
}
/// Send the device to sleep mode if it is not asleep using [togglePower].
/// Send the device to sleep mode if it is not asleep using [togglePower].
@override
@override
Future
<
Null
>
sendToSleep
()
async
{
Future
<
void
>
sendToSleep
()
async
{
if
(!(
await
isAsleep
()))
if
(!(
await
isAsleep
()))
await
togglePower
();
await
togglePower
();
}
}
...
@@ -233,7 +233,7 @@ class AndroidDevice implements Device {
...
@@ -233,7 +233,7 @@ class AndroidDevice implements Device {
/// Sends `KEYCODE_POWER` (26), which causes the device to toggle its mode
/// Sends `KEYCODE_POWER` (26), which causes the device to toggle its mode
/// between awake and asleep.
/// between awake and asleep.
@override
@override
Future
<
Null
>
togglePower
()
async
{
Future
<
void
>
togglePower
()
async
{
await
shellExec
(
'input'
,
const
<
String
>[
'keyevent'
,
'26'
]);
await
shellExec
(
'input'
,
const
<
String
>[
'keyevent'
,
'26'
]);
}
}
...
@@ -241,13 +241,13 @@ class AndroidDevice implements Device {
...
@@ -241,13 +241,13 @@ class AndroidDevice implements Device {
///
///
/// This only works when the device doesn't have a secure unlock pattern.
/// This only works when the device doesn't have a secure unlock pattern.
@override
@override
Future
<
Null
>
unlock
()
async
{
Future
<
void
>
unlock
()
async
{
await
wakeUp
();
await
wakeUp
();
await
shellExec
(
'input'
,
const
<
String
>[
'keyevent'
,
'82'
]);
await
shellExec
(
'input'
,
const
<
String
>[
'keyevent'
,
'82'
]);
}
}
@override
@override
Future
<
Null
>
tap
(
int
x
,
int
y
)
async
{
Future
<
void
>
tap
(
int
x
,
int
y
)
async
{
await
shellExec
(
'input'
,
<
String
>[
'tap'
,
'
$x
'
,
'
$y
'
]);
await
shellExec
(
'input'
,
<
String
>[
'tap'
,
'
$x
'
,
'
$y
'
]);
}
}
...
@@ -261,7 +261,7 @@ class AndroidDevice implements Device {
...
@@ -261,7 +261,7 @@ class AndroidDevice implements Device {
}
}
/// Executes [command] on `adb shell` and returns its exit code.
/// Executes [command] on `adb shell` and returns its exit code.
Future
<
Null
>
shellExec
(
String
command
,
List
<
String
>
arguments
,
{
Map
<
String
,
String
>
environment
})
async
{
Future
<
void
>
shellExec
(
String
command
,
List
<
String
>
arguments
,
{
Map
<
String
,
String
>
environment
})
async
{
await
adb
(<
String
>[
'shell'
,
command
]..
addAll
(
arguments
),
environment:
environment
);
await
adb
(<
String
>[
'shell'
,
command
]..
addAll
(
arguments
),
environment:
environment
);
}
}
...
@@ -343,7 +343,7 @@ class AndroidDevice implements Device {
...
@@ -343,7 +343,7 @@ class AndroidDevice implements Device {
}
}
@override
@override
Future
<
Null
>
stop
(
String
packageName
)
async
{
Future
<
void
>
stop
(
String
packageName
)
async
{
return
shellExec
(
'am'
,
<
String
>[
'force-stop'
,
packageName
]);
return
shellExec
(
'am'
,
<
String
>[
'force-stop'
,
packageName
]);
}
}
}
}
...
@@ -371,7 +371,7 @@ class IosDeviceDiscovery implements DeviceDiscovery {
...
@@ -371,7 +371,7 @@ class IosDeviceDiscovery implements DeviceDiscovery {
/// Picks a random iOS device out of connected devices and sets it as
/// Picks a random iOS device out of connected devices and sets it as
/// [workingDevice].
/// [workingDevice].
@override
@override
Future
<
Null
>
chooseWorkingDevice
()
async
{
Future
<
void
>
chooseWorkingDevice
()
async
{
final
List
<
IosDevice
>
allDevices
=
(
await
discoverDevices
())
final
List
<
IosDevice
>
allDevices
=
(
await
discoverDevices
())
.
map
<
IosDevice
>((
String
id
)
=>
IosDevice
(
deviceId:
id
))
.
map
<
IosDevice
>((
String
id
)
=>
IosDevice
(
deviceId:
id
))
.
toList
();
.
toList
();
...
@@ -405,7 +405,7 @@ class IosDeviceDiscovery implements DeviceDiscovery {
...
@@ -405,7 +405,7 @@ class IosDeviceDiscovery implements DeviceDiscovery {
}
}
@override
@override
Future
<
Null
>
performPreflightTasks
()
async
{
Future
<
void
>
performPreflightTasks
()
async
{
// Currently we do not have preflight tasks for iOS.
// Currently we do not have preflight tasks for iOS.
return
null
;
return
null
;
}
}
...
@@ -430,19 +430,19 @@ class IosDevice implements Device {
...
@@ -430,19 +430,19 @@ class IosDevice implements Device {
Future
<
bool
>
isAsleep
()
async
=>
false
;
Future
<
bool
>
isAsleep
()
async
=>
false
;
@override
@override
Future
<
Null
>
wakeUp
()
async
{}
Future
<
void
>
wakeUp
()
async
{}
@override
@override
Future
<
Null
>
sendToSleep
()
async
{}
Future
<
void
>
sendToSleep
()
async
{}
@override
@override
Future
<
Null
>
togglePower
()
async
{}
Future
<
void
>
togglePower
()
async
{}
@override
@override
Future
<
Null
>
unlock
()
async
{}
Future
<
void
>
unlock
()
async
{}
@override
@override
Future
<
Null
>
tap
(
int
x
,
int
y
)
async
{
Future
<
void
>
tap
(
int
x
,
int
y
)
async
{
throw
'Not implemented'
;
throw
'Not implemented'
;
}
}
...
@@ -457,7 +457,7 @@ class IosDevice implements Device {
...
@@ -457,7 +457,7 @@ class IosDevice implements Device {
}
}
@override
@override
Future
<
Null
>
stop
(
String
packageName
)
async
{}
Future
<
void
>
stop
(
String
packageName
)
async
{}
}
}
/// Path to the `adb` executable.
/// Path to the `adb` executable.
...
...
dev/devicelab/lib/framework/ios.dart
View file @
d340e2f2
...
@@ -19,7 +19,7 @@ const FileSystem _fs = io.LocalFileSystem();
...
@@ -19,7 +19,7 @@ const FileSystem _fs = io.LocalFileSystem();
/// information required to build and run the project, if
/// information required to build and run the project, if
/// FLUTTER_DEVICELAB_XCODE_PROVISIONING_CONFIG is set. If it is not set,
/// FLUTTER_DEVICELAB_XCODE_PROVISIONING_CONFIG is set. If it is not set,
/// we rely on automatic signing by Xcode.
/// we rely on automatic signing by Xcode.
Future
<
Null
>
prepareProvisioningCertificates
(
String
flutterProjectPath
)
async
{
Future
<
void
>
prepareProvisioningCertificates
(
String
flutterProjectPath
)
async
{
final
String
certificateConfig
=
await
_readProvisioningConfigFile
();
final
String
certificateConfig
=
await
_readProvisioningConfigFile
();
if
(
certificateConfig
==
null
)
{
if
(
certificateConfig
==
null
)
{
// No cert config available, rely on automatic signing by Xcode.
// No cert config available, rely on automatic signing by Xcode.
...
@@ -31,12 +31,12 @@ Future<Null> prepareProvisioningCertificates(String flutterProjectPath) async {
...
@@ -31,12 +31,12 @@ Future<Null> prepareProvisioningCertificates(String flutterProjectPath) async {
await
testXcconfig
.
writeAsString
(
certificateConfig
);
await
testXcconfig
.
writeAsString
(
certificateConfig
);
}
}
Future
<
Null
>
runPodInstallForCustomPodfile
(
String
flutterProjectPath
)
async
{
Future
<
void
>
runPodInstallForCustomPodfile
(
String
flutterProjectPath
)
async
{
final
String
iosPath
=
path
.
join
(
flutterProjectPath
,
'ios'
);
final
String
iosPath
=
path
.
join
(
flutterProjectPath
,
'ios'
);
exec
(
'pod'
,
<
String
>[
'install'
,
'--project-directory=
$iosPath
'
]);
exec
(
'pod'
,
<
String
>[
'install'
,
'--project-directory=
$iosPath
'
]);
}
}
Future
<
Null
>
_patchXcconfigFilesIfNotPatched
(
String
flutterProjectPath
)
async
{
Future
<
void
>
_patchXcconfigFilesIfNotPatched
(
String
flutterProjectPath
)
async
{
final
List
<
File
>
xcconfigFiles
=
<
File
>[
final
List
<
File
>
xcconfigFiles
=
<
File
>[
_fs
.
file
(
path
.
join
(
flutterProjectPath
,
'ios/Flutter/Flutter.xcconfig'
)),
_fs
.
file
(
path
.
join
(
flutterProjectPath
,
'ios/Flutter/Flutter.xcconfig'
)),
_fs
.
file
(
path
.
join
(
flutterProjectPath
,
'ios/Flutter/Debug.xcconfig'
)),
_fs
.
file
(
path
.
join
(
flutterProjectPath
,
'ios/Flutter/Debug.xcconfig'
)),
...
...
dev/devicelab/lib/framework/runner.dart
View file @
d340e2f2
...
@@ -97,7 +97,7 @@ Future<VMIsolateRef> _connectToRunnerIsolate(int vmServicePort) async {
...
@@ -97,7 +97,7 @@ Future<VMIsolateRef> _connectToRunnerIsolate(int vmServicePort) async {
// delay to let the task process open up the VM service port.
// delay to let the task process open up the VM service port.
// Otherwise we almost always hit the non-ready case first and
// Otherwise we almost always hit the non-ready case first and
// wait a whole 1 second, which is annoying.
// wait a whole 1 second, which is annoying.
await
Future
<
Null
>.
delayed
(
const
Duration
(
milliseconds:
100
));
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
100
));
while
(
true
)
{
while
(
true
)
{
try
{
try
{
...
@@ -123,7 +123,7 @@ Future<VMIsolateRef> _connectToRunnerIsolate(int vmServicePort) async {
...
@@ -123,7 +123,7 @@ Future<VMIsolateRef> _connectToRunnerIsolate(int vmServicePort) async {
print
(
'VM service not ready yet:
$error
'
);
print
(
'VM service not ready yet:
$error
'
);
const
Duration
pauseBetweenRetries
=
Duration
(
milliseconds:
200
);
const
Duration
pauseBetweenRetries
=
Duration
(
milliseconds:
200
);
print
(
'Will retry in
$pauseBetweenRetries
.'
);
print
(
'Will retry in
$pauseBetweenRetries
.'
);
await
Future
<
Null
>.
delayed
(
pauseBetweenRetries
);
await
Future
<
void
>.
delayed
(
pauseBetweenRetries
);
}
}
}
}
}
}
...
...
dev/devicelab/lib/framework/utils.dart
View file @
d340e2f2
...
@@ -243,12 +243,12 @@ Future<Process> startProcess(
...
@@ -243,12 +243,12 @@ Future<Process> startProcess(
return
process
;
return
process
;
}
}
Future
<
Null
>
forceQuitRunningProcesses
()
async
{
Future
<
void
>
forceQuitRunningProcesses
()
async
{
if
(
_runningProcesses
.
isEmpty
)
if
(
_runningProcesses
.
isEmpty
)
return
;
return
;
// Give normally quitting processes a chance to report their exit code.
// Give normally quitting processes a chance to report their exit code.
await
Future
<
Null
>.
delayed
(
const
Duration
(
seconds:
1
));
await
Future
<
void
>.
delayed
(
const
Duration
(
seconds:
1
));
// Whatever's left, kill it.
// Whatever's left, kill it.
for
(
ProcessInfo
p
in
_runningProcesses
)
{
for
(
ProcessInfo
p
in
_runningProcesses
)
{
...
@@ -270,8 +270,8 @@ Future<int> exec(
...
@@ -270,8 +270,8 @@ Future<int> exec(
})
async
{
})
async
{
final
Process
process
=
await
startProcess
(
executable
,
arguments
,
environment:
environment
,
workingDirectory:
workingDirectory
);
final
Process
process
=
await
startProcess
(
executable
,
arguments
,
environment:
environment
,
workingDirectory:
workingDirectory
);
final
Completer
<
Null
>
stdoutDone
=
Completer
<
Null
>();
final
Completer
<
void
>
stdoutDone
=
Completer
<
void
>();
final
Completer
<
Null
>
stderrDone
=
Completer
<
Null
>();
final
Completer
<
void
>
stderrDone
=
Completer
<
void
>();
process
.
stdout
process
.
stdout
.
transform
<
String
>(
utf8
.
decoder
)
.
transform
<
String
>(
utf8
.
decoder
)
.
transform
<
String
>(
const
LineSplitter
())
.
transform
<
String
>(
const
LineSplitter
())
...
@@ -285,7 +285,7 @@ Future<int> exec(
...
@@ -285,7 +285,7 @@ Future<int> exec(
print
(
'stderr:
$line
'
);
print
(
'stderr:
$line
'
);
},
onDone:
()
{
stderrDone
.
complete
();
});
},
onDone:
()
{
stderrDone
.
complete
();
});
await
Future
.
wait
<
Null
>(<
Future
<
Null
>>[
stdoutDone
.
future
,
stderrDone
.
future
]);
await
Future
.
wait
<
void
>(<
Future
<
void
>>[
stdoutDone
.
future
,
stderrDone
.
future
]);
final
int
exitCode
=
await
process
.
exitCode
;
final
int
exitCode
=
await
process
.
exitCode
;
if
(
exitCode
!=
0
&&
!
canFail
)
if
(
exitCode
!=
0
&&
!
canFail
)
...
@@ -307,8 +307,8 @@ Future<String> eval(
...
@@ -307,8 +307,8 @@ Future<String> eval(
final
Process
process
=
await
startProcess
(
executable
,
arguments
,
environment:
environment
,
workingDirectory:
workingDirectory
);
final
Process
process
=
await
startProcess
(
executable
,
arguments
,
environment:
environment
,
workingDirectory:
workingDirectory
);
final
StringBuffer
output
=
StringBuffer
();
final
StringBuffer
output
=
StringBuffer
();
final
Completer
<
Null
>
stdoutDone
=
Completer
<
Null
>();
final
Completer
<
void
>
stdoutDone
=
Completer
<
void
>();
final
Completer
<
Null
>
stderrDone
=
Completer
<
Null
>();
final
Completer
<
void
>
stderrDone
=
Completer
<
void
>();
process
.
stdout
process
.
stdout
.
transform
<
String
>(
utf8
.
decoder
)
.
transform
<
String
>(
utf8
.
decoder
)
.
transform
<
String
>(
const
LineSplitter
())
.
transform
<
String
>(
const
LineSplitter
())
...
@@ -323,7 +323,7 @@ Future<String> eval(
...
@@ -323,7 +323,7 @@ Future<String> eval(
print
(
'stderr:
$line
'
);
print
(
'stderr:
$line
'
);
},
onDone:
()
{
stderrDone
.
complete
();
});
},
onDone:
()
{
stderrDone
.
complete
();
});
await
Future
.
wait
<
Null
>(<
Future
<
Null
>>[
stdoutDone
.
future
,
stderrDone
.
future
]);
await
Future
.
wait
<
void
>(<
Future
<
void
>>[
stdoutDone
.
future
,
stderrDone
.
future
]);
final
int
exitCode
=
await
process
.
exitCode
;
final
int
exitCode
=
await
process
.
exitCode
;
if
(
exitCode
!=
0
&&
!
canFail
)
if
(
exitCode
!=
0
&&
!
canFail
)
...
@@ -420,7 +420,7 @@ String jsonEncode(dynamic data) {
...
@@ -420,7 +420,7 @@ String jsonEncode(dynamic data) {
return
const
JsonEncoder
.
withIndent
(
' '
).
convert
(
data
)
+
'
\n
'
;
return
const
JsonEncoder
.
withIndent
(
' '
).
convert
(
data
)
+
'
\n
'
;
}
}
Future
<
Null
>
getFlutter
(
String
revision
)
async
{
Future
<
void
>
getFlutter
(
String
revision
)
async
{
section
(
'Get Flutter!'
);
section
(
'Get Flutter!'
);
if
(
exists
(
flutterDirectory
))
{
if
(
exists
(
flutterDirectory
))
{
...
@@ -495,8 +495,8 @@ Iterable<String> grep(Pattern pattern, {@required String from}) {
...
@@ -495,8 +495,8 @@ Iterable<String> grep(Pattern pattern, {@required String from}) {
/// } catch (error, chain) {
/// } catch (error, chain) {
///
///
/// }
/// }
Future
<
Null
>
runAndCaptureAsyncStacks
(
Future
<
Null
>
callback
())
{
Future
<
void
>
runAndCaptureAsyncStacks
(
Future
<
void
>
callback
())
{
final
Completer
<
Null
>
completer
=
Completer
<
Null
>();
final
Completer
<
void
>
completer
=
Completer
<
void
>();
Chain
.
capture
(()
async
{
Chain
.
capture
(()
async
{
await
callback
();
await
callback
();
completer
.
complete
();
completer
.
complete
();
...
...
dev/devicelab/lib/tasks/hot_mode_tests.dart
View file @
d340e2f2
...
@@ -43,8 +43,8 @@ TaskFunction createHotModeTest() {
...
@@ -43,8 +43,8 @@ TaskFunction createHotModeTest() {
environment:
null
environment:
null
);
);
final
Completer
<
Null
>
stdoutDone
=
Completer
<
Null
>();
final
Completer
<
void
>
stdoutDone
=
Completer
<
void
>();
final
Completer
<
Null
>
stderrDone
=
Completer
<
Null
>();
final
Completer
<
void
>
stderrDone
=
Completer
<
void
>();
process
.
stdout
process
.
stdout
.
transform
<
String
>(
utf8
.
decoder
)
.
transform
<
String
>(
utf8
.
decoder
)
.
transform
<
String
>(
const
LineSplitter
())
.
transform
<
String
>(
const
LineSplitter
())
...
@@ -80,8 +80,8 @@ TaskFunction createHotModeTest() {
...
@@ -80,8 +80,8 @@ TaskFunction createHotModeTest() {
stderrDone
.
complete
();
stderrDone
.
complete
();
});
});
await
Future
.
wait
<
Null
>(
await
Future
.
wait
<
void
>(
<
Future
<
Null
>>[
stdoutDone
.
future
,
stderrDone
.
future
]);
<
Future
<
void
>>[
stdoutDone
.
future
,
stderrDone
.
future
]);
await
process
.
exitCode
;
await
process
.
exitCode
;
twoReloadsData
=
json
.
decode
(
benchmarkFile
.
readAsStringSync
());
twoReloadsData
=
json
.
decode
(
benchmarkFile
.
readAsStringSync
());
...
@@ -96,8 +96,8 @@ TaskFunction createHotModeTest() {
...
@@ -96,8 +96,8 @@ TaskFunction createHotModeTest() {
<
String
>[
'run'
]..
addAll
(
options
),
<
String
>[
'run'
]..
addAll
(
options
),
environment:
null
environment:
null
);
);
final
Completer
<
Null
>
stdoutDone
=
Completer
<
Null
>();
final
Completer
<
void
>
stdoutDone
=
Completer
<
void
>();
final
Completer
<
Null
>
stderrDone
=
Completer
<
Null
>();
final
Completer
<
void
>
stderrDone
=
Completer
<
void
>();
process
.
stdout
process
.
stdout
.
transform
<
String
>(
utf8
.
decoder
)
.
transform
<
String
>(
utf8
.
decoder
)
.
transform
<
String
>(
const
LineSplitter
())
.
transform
<
String
>(
const
LineSplitter
())
...
@@ -118,8 +118,8 @@ TaskFunction createHotModeTest() {
...
@@ -118,8 +118,8 @@ TaskFunction createHotModeTest() {
stderrDone
.
complete
();
stderrDone
.
complete
();
});
});
await
Future
.
wait
<
Null
>(
await
Future
.
wait
<
void
>(
<
Future
<
Null
>>[
stdoutDone
.
future
,
stderrDone
.
future
]);
<
Future
<
void
>>[
stdoutDone
.
future
,
stderrDone
.
future
]);
await
process
.
exitCode
;
await
process
.
exitCode
;
freshRestartReloadsData
=
freshRestartReloadsData
=
...
...
dev/devicelab/lib/tasks/plugin_tests.dart
View file @
d340e2f2
...
@@ -73,7 +73,7 @@ class FlutterProject {
...
@@ -73,7 +73,7 @@ class FlutterProject {
String
get
rootPath
=>
path
.
join
(
parent
.
path
,
name
);
String
get
rootPath
=>
path
.
join
(
parent
.
path
,
name
);
Future
<
Null
>
addPlugin
(
String
plugin
)
async
{
Future
<
void
>
addPlugin
(
String
plugin
)
async
{
final
File
pubspec
=
File
(
path
.
join
(
rootPath
,
'pubspec.yaml'
));
final
File
pubspec
=
File
(
path
.
join
(
rootPath
,
'pubspec.yaml'
));
String
content
=
await
pubspec
.
readAsString
();
String
content
=
await
pubspec
.
readAsString
();
content
=
content
.
replaceFirst
(
content
=
content
.
replaceFirst
(
...
@@ -83,13 +83,13 @@ class FlutterProject {
...
@@ -83,13 +83,13 @@ class FlutterProject {
await
pubspec
.
writeAsString
(
content
,
flush:
true
);
await
pubspec
.
writeAsString
(
content
,
flush:
true
);
}
}
Future
<
Null
>
build
(
String
target
)
async
{
Future
<
void
>
build
(
String
target
)
async
{
await
inDirectory
(
Directory
(
rootPath
),
()
async
{
await
inDirectory
(
Directory
(
rootPath
),
()
async
{
await
flutter
(
'build'
,
options:
<
String
>[
target
]);
await
flutter
(
'build'
,
options:
<
String
>[
target
]);
});
});
}
}
Future
<
Null
>
delete
()
async
{
Future
<
void
>
delete
()
async
{
if
(
Platform
.
isWindows
)
{
if
(
Platform
.
isWindows
)
{
// A running Gradle daemon might prevent us from deleting the project
// A running Gradle daemon might prevent us from deleting the project
// folder on Windows.
// folder on Windows.
...
@@ -99,7 +99,7 @@ class FlutterProject {
...
@@ -99,7 +99,7 @@ class FlutterProject {
canFail:
true
,
canFail:
true
,
);
);
// TODO(ianh): Investigating if flakiness is timing dependent.
// TODO(ianh): Investigating if flakiness is timing dependent.
await
Future
<
Null
>.
delayed
(
const
Duration
(
seconds:
10
));
await
Future
<
void
>.
delayed
(
const
Duration
(
seconds:
10
));
}
}
rmTree
(
parent
);
rmTree
(
parent
);
}
}
...
...
dev/devicelab/lib/tasks/save_catalog_screenshots.dart
View file @
d340e2f2
...
@@ -61,7 +61,7 @@ class Upload {
...
@@ -61,7 +61,7 @@ class Upload {
final
HttpClientResponse
response
=
await
request
.
close
().
timeout
(
timeLimit
);
final
HttpClientResponse
response
=
await
request
.
close
().
timeout
(
timeLimit
);
if
(
response
.
statusCode
==
HttpStatus
.
ok
)
{
if
(
response
.
statusCode
==
HttpStatus
.
ok
)
{
logMessage
(
'Saved
$name
'
);
logMessage
(
'Saved
$name
'
);
await
response
.
drain
<
Null
>();
await
response
.
drain
<
void
>();
}
else
{
}
else
{
// TODO(hansmuller): only retry on 5xx and 429 responses
// TODO(hansmuller): only retry on 5xx and 429 responses
logMessage
(
'Request to save "
$name
" (length
${content.length}
) failed with status
${response.statusCode}
, will retry'
);
logMessage
(
'Request to save "
$name
" (length
${content.length}
) failed with status
${response.statusCode}
, will retry'
);
...
@@ -93,7 +93,7 @@ class Upload {
...
@@ -93,7 +93,7 @@ class Upload {
static
bool
isNotComplete
(
Upload
upload
)
=>
!
upload
.
isComplete
;
static
bool
isNotComplete
(
Upload
upload
)
=>
!
upload
.
isComplete
;
}
}
Future
<
Null
>
saveScreenshots
(
List
<
String
>
fromPaths
,
List
<
String
>
largeNames
,
List
<
String
>
smallNames
)
async
{
Future
<
void
>
saveScreenshots
(
List
<
String
>
fromPaths
,
List
<
String
>
largeNames
,
List
<
String
>
smallNames
)
async
{
assert
(
fromPaths
.
length
==
largeNames
.
length
);
assert
(
fromPaths
.
length
==
largeNames
.
length
);
assert
(
fromPaths
.
length
==
smallNames
.
length
);
assert
(
fromPaths
.
length
==
smallNames
.
length
);
...
@@ -113,7 +113,7 @@ Future<Null> saveScreenshots(List<String> fromPaths, List<String> largeNames, Li
...
@@ -113,7 +113,7 @@ Future<Null> saveScreenshots(List<String> fromPaths, List<String> largeNames, Li
// If path is lib/foo.png then screenshotName is foo.
// If path is lib/foo.png then screenshotName is foo.
String
screenshotName
(
String
path
)
=>
basenameWithoutExtension
(
path
);
String
screenshotName
(
String
path
)
=>
basenameWithoutExtension
(
path
);
Future
<
Null
>
saveCatalogScreenshots
({
Future
<
void
>
saveCatalogScreenshots
({
Directory
directory
,
// Where the *.png screenshots are.
Directory
directory
,
// Where the *.png screenshots are.
String
commit
,
// The commit hash to be used as a cloud storage "directory".
String
commit
,
// The commit hash to be used as a cloud storage "directory".
String
token
,
// Cloud storage authorization token.
String
token
,
// Cloud storage authorization token.
...
...
dev/devicelab/test/adb_test.dart
View file @
d340e2f2
...
@@ -192,7 +192,7 @@ class FakeDevice extends AndroidDevice {
...
@@ -192,7 +192,7 @@ class FakeDevice extends AndroidDevice {
}
}
@override
@override
Future
<
Null
>
shellExec
(
String
command
,
List
<
String
>
arguments
,
{
Map
<
String
,
String
>
environment
})
async
{
Future
<
void
>
shellExec
(
String
command
,
List
<
String
>
arguments
,
{
Map
<
String
,
String
>
environment
})
async
{
commandLog
.
add
(
CommandArgs
(
commandLog
.
add
(
CommandArgs
(
command:
command
,
command:
command
,
arguments:
arguments
,
arguments:
arguments
,
...
...
dev/integration_tests/external_ui/lib/main.dart
View file @
d340e2f2
...
@@ -30,7 +30,7 @@ class MyAppState extends State<MyApp> with SingleTickerProviderStateMixin {
...
@@ -30,7 +30,7 @@ class MyAppState extends State<MyApp> with SingleTickerProviderStateMixin {
IconData
_icon
;
IconData
_icon
;
double
_flutterFrameRate
;
double
_flutterFrameRate
;
Future
<
Null
>
_summarizeStats
()
async
{
Future
<
void
>
_summarizeStats
()
async
{
final
double
framesProduced
=
await
channel
.
invokeMethod
(
'getProducedFrameRate'
);
final
double
framesProduced
=
await
channel
.
invokeMethod
(
'getProducedFrameRate'
);
final
double
framesConsumed
=
await
channel
.
invokeMethod
(
'getConsumedFrameRate'
);
final
double
framesConsumed
=
await
channel
.
invokeMethod
(
'getConsumedFrameRate'
);
_summary
=
'''
_summary
=
'''
...
@@ -39,7 +39,7 @@ Consumed: ${framesConsumed.toStringAsFixed(1)}fps
...
@@ -39,7 +39,7 @@ Consumed: ${framesConsumed.toStringAsFixed(1)}fps
Widget builds:
$_widgetBuilds
'''
;
Widget builds:
$_widgetBuilds
'''
;
}
}
Future
<
Null
>
_nextState
()
async
{
Future
<
void
>
_nextState
()
async
{
switch
(
_state
)
{
switch
(
_state
)
{
case
FrameState
.
initial
:
case
FrameState
.
initial
:
debugPrint
(
'Starting .5x speed test...'
);
debugPrint
(
'Starting .5x speed test...'
);
...
@@ -90,9 +90,9 @@ Widget builds: $_widgetBuilds''';
...
@@ -90,9 +90,9 @@ Widget builds: $_widgetBuilds''';
static
const
int
calibrationTickCount
=
600
;
static
const
int
calibrationTickCount
=
600
;
/// Measures Flutter's frame rate.
/// Measures Flutter's frame rate.
Future
<
Null
>
_calibrate
()
async
{
Future
<
void
>
_calibrate
()
async
{
debugPrint
(
'Awaiting calm (3 second pause)...'
);
debugPrint
(
'Awaiting calm (3 second pause)...'
);
await
Future
<
Null
>.
delayed
(
const
Duration
(
milliseconds:
3000
));
await
Future
<
void
>.
delayed
(
const
Duration
(
milliseconds:
3000
));
debugPrint
(
'Calibrating...'
);
debugPrint
(
'Calibrating...'
);
DateTime
startTime
;
DateTime
startTime
;
int
tickCount
=
0
;
int
tickCount
=
0
;
...
...
dev/integration_tests/external_ui/test_driver/main_test.dart
View file @
d340e2f2
...
@@ -11,7 +11,7 @@ final RegExp calibrationRegExp = RegExp('Flutter frame rate is (.*)fps');
...
@@ -11,7 +11,7 @@ final RegExp calibrationRegExp = RegExp('Flutter frame rate is (.*)fps');
final
RegExp
statsRegExp
=
RegExp
(
'Produced: (.*)fps
\n
Consumed: (.*)fps
\n
Widget builds: (.*)'
);
final
RegExp
statsRegExp
=
RegExp
(
'Produced: (.*)fps
\n
Consumed: (.*)fps
\n
Widget builds: (.*)'
);
const
Duration
samplingTime
=
Duration
(
seconds:
8
);
const
Duration
samplingTime
=
Duration
(
seconds:
8
);
Future
<
Null
>
main
()
async
{
Future
<
void
>
main
()
async
{
group
(
'texture suite'
,
()
{
group
(
'texture suite'
,
()
{
FlutterDriver
driver
;
FlutterDriver
driver
;
...
@@ -38,7 +38,7 @@ Future<Null> main() async {
...
@@ -38,7 +38,7 @@ Future<Null> main() async {
// Texture frame stats at 0.5x Flutter frame rate
// Texture frame stats at 0.5x Flutter frame rate
await
driver
.
tap
(
fab
);
await
driver
.
tap
(
fab
);
await
Future
<
Null
>.
delayed
(
samplingTime
);
await
Future
<
void
>.
delayed
(
samplingTime
);
await
driver
.
tap
(
fab
);
await
driver
.
tap
(
fab
);
final
String
statsSlow
=
await
driver
.
getText
(
summary
);
final
String
statsSlow
=
await
driver
.
getText
(
summary
);
...
@@ -50,7 +50,7 @@ Future<Null> main() async {
...
@@ -50,7 +50,7 @@ Future<Null> main() async {
// Texture frame stats at 2.0x Flutter frame rate
// Texture frame stats at 2.0x Flutter frame rate
await
driver
.
tap
(
fab
);
await
driver
.
tap
(
fab
);
await
Future
<
Null
>.
delayed
(
samplingTime
);
await
Future
<
void
>.
delayed
(
samplingTime
);
await
driver
.
tap
(
fab
);
await
driver
.
tap
(
fab
);
final
String
statsFast
=
await
driver
.
getText
(
summary
);
final
String
statsFast
=
await
driver
.
getText
(
summary
);
...
...
dev/integration_tests/ui/test_driver/driver_test.dart
View file @
d340e2f2
...
@@ -36,14 +36,14 @@ void main() {
...
@@ -36,14 +36,14 @@ void main() {
test
(
'waitForAbsent should resolve when text "present" disappears'
,
()
async
{
test
(
'waitForAbsent should resolve when text "present" disappears'
,
()
async
{
// Begin waiting for it to disappear
// Begin waiting for it to disappear
final
Completer
<
Null
>
whenWaitForAbsentResolves
=
Completer
<
Null
>();
final
Completer
<
void
>
whenWaitForAbsentResolves
=
Completer
<
void
>();
driver
.
waitForAbsent
(
presentText
).
then
(
driver
.
waitForAbsent
(
presentText
).
then
(
whenWaitForAbsentResolves
.
complete
,
whenWaitForAbsentResolves
.
complete
,
onError:
whenWaitForAbsentResolves
.
completeError
,
onError:
whenWaitForAbsentResolves
.
completeError
,
);
);
// Wait 1 second then make it disappear
// Wait 1 second then make it disappear
await
Future
<
Null
>.
delayed
(
const
Duration
(
seconds:
1
));
await
Future
<
void
>.
delayed
(
const
Duration
(
seconds:
1
));
await
driver
.
tap
(
find
.
byValueKey
(
'togglePresent'
));
await
driver
.
tap
(
find
.
byValueKey
(
'togglePresent'
));
// Ensure waitForAbsent resolves
// Ensure waitForAbsent resolves
...
@@ -61,14 +61,14 @@ void main() {
...
@@ -61,14 +61,14 @@ void main() {
test
(
'waitFor should resolve when text "present" reappears'
,
()
async
{
test
(
'waitFor should resolve when text "present" reappears'
,
()
async
{
// Begin waiting for it to reappear
// Begin waiting for it to reappear
final
Completer
<
Null
>
whenWaitForResolves
=
Completer
<
Null
>();
final
Completer
<
void
>
whenWaitForResolves
=
Completer
<
void
>();
driver
.
waitFor
(
presentText
).
then
(
driver
.
waitFor
(
presentText
).
then
(
whenWaitForResolves
.
complete
,
whenWaitForResolves
.
complete
,
onError:
whenWaitForResolves
.
completeError
,
onError:
whenWaitForResolves
.
completeError
,
);
);
// Wait 1 second then make it appear
// Wait 1 second then make it appear
await
Future
<
Null
>.
delayed
(
const
Duration
(
seconds:
1
));
await
Future
<
void
>.
delayed
(
const
Duration
(
seconds:
1
));
await
driver
.
tap
(
find
.
byValueKey
(
'togglePresent'
));
await
driver
.
tap
(
find
.
byValueKey
(
'togglePresent'
));
// Ensure waitFor resolves
// Ensure waitFor resolves
...
...
dev/integration_tests/ui/test_driver/keyboard_resize_test.dart
View file @
d340e2f2
...
@@ -33,7 +33,7 @@ void main() {
...
@@ -33,7 +33,7 @@ void main() {
final
SerializableFinder
defaultTextField
=
find
.
byValueKey
(
keys
.
kDefaultTextField
);
final
SerializableFinder
defaultTextField
=
find
.
byValueKey
(
keys
.
kDefaultTextField
);
await
driver
.
waitFor
(
defaultTextField
);
await
driver
.
waitFor
(
defaultTextField
);
await
driver
.
tap
(
defaultTextField
);
await
driver
.
tap
(
defaultTextField
);
await
Future
<
Null
>.
delayed
(
const
Duration
(
seconds:
1
));
await
Future
<
void
>.
delayed
(
const
Duration
(
seconds:
1
));
// Measure the height with keyboard displayed.
// Measure the height with keyboard displayed.
final
String
heightWithKeyboardShown
=
await
driver
.
getText
(
heightText
);
final
String
heightWithKeyboardShown
=
await
driver
.
getText
(
heightText
);
...
@@ -43,7 +43,7 @@ void main() {
...
@@ -43,7 +43,7 @@ void main() {
final
SerializableFinder
unfocusButton
=
find
.
byValueKey
(
keys
.
kUnfocusButton
);
final
SerializableFinder
unfocusButton
=
find
.
byValueKey
(
keys
.
kUnfocusButton
);
await
driver
.
waitFor
(
unfocusButton
);
await
driver
.
waitFor
(
unfocusButton
);
await
driver
.
tap
(
unfocusButton
);
await
driver
.
tap
(
unfocusButton
);
await
Future
<
Null
>.
delayed
(
const
Duration
(
seconds:
1
));
await
Future
<
void
>.
delayed
(
const
Duration
(
seconds:
1
));
// Measure the final height.
// Measure the final height.
final
String
endHeight
=
await
driver
.
getText
(
heightText
);
final
String
endHeight
=
await
driver
.
getText
(
heightText
);
...
...
dev/integration_tests/ui/test_driver/keyboard_textfield_test.dart
View file @
d340e2f2
...
@@ -41,7 +41,7 @@ void main() {
...
@@ -41,7 +41,7 @@ void main() {
// Bring up keyboard
// Bring up keyboard
await
driver
.
tap
(
textFieldFinder
);
await
driver
.
tap
(
textFieldFinder
);
await
Future
<
Null
>.
delayed
(
const
Duration
(
seconds:
1
));
await
Future
<
void
>.
delayed
(
const
Duration
(
seconds:
1
));
// Ensure that TextField is visible again
// Ensure that TextField is visible again
await
driver
.
waitFor
(
textFieldFinder
);
await
driver
.
waitFor
(
textFieldFinder
);
...
...
dev/manual_tests/lib/material_arc.dart
View file @
d340e2f2
...
@@ -438,7 +438,7 @@ class _AnimationDemoState extends State<AnimationDemo> with TickerProviderStateM
...
@@ -438,7 +438,7 @@ class _AnimationDemoState extends State<AnimationDemo> with TickerProviderStateM
];
];
}
}
Future
<
Null
>
_play
(
_ArcDemo
demo
)
async
{
Future
<
void
>
_play
(
_ArcDemo
demo
)
async
{
await
demo
.
controller
.
forward
();
await
demo
.
controller
.
forward
();
if
(
demo
.
key
.
currentState
!=
null
&&
demo
.
key
.
currentState
.
mounted
)
if
(
demo
.
key
.
currentState
!=
null
&&
demo
.
key
.
currentState
.
mounted
)
demo
.
controller
.
reverse
();
demo
.
controller
.
reverse
();
...
...
dev/tools/dartdoc.dart
View file @
d340e2f2
...
@@ -25,7 +25,7 @@ const String kDocRoot = 'dev/docs/doc';
...
@@ -25,7 +25,7 @@ const String kDocRoot = 'dev/docs/doc';
/// in your path. It requires that 'flutter' has been run previously. It uses
/// in your path. It requires that 'flutter' has been run previously. It uses
/// the version of Dart downloaded by the 'flutter' tool in this repository and
/// the version of Dart downloaded by the 'flutter' tool in this repository and
/// will crash if that is absent.
/// will crash if that is absent.
Future
<
Null
>
main
(
List
<
String
>
arguments
)
async
{
Future
<
void
>
main
(
List
<
String
>
arguments
)
async
{
final
ArgParser
argParser
=
_createArgsParser
();
final
ArgParser
argParser
=
_createArgsParser
();
final
ArgResults
args
=
argParser
.
parse
(
arguments
);
final
ArgResults
args
=
argParser
.
parse
(
arguments
);
if
(
args
[
'help'
])
{
if
(
args
[
'help'
])
{
...
...
dev/tools/gen_date_localizations.dart
View file @
d340e2f2
...
@@ -36,7 +36,7 @@ import 'localizations_utils.dart';
...
@@ -36,7 +36,7 @@ import 'localizations_utils.dart';
const
String
_kCommandName
=
'gen_date_localizations.dart'
;
const
String
_kCommandName
=
'gen_date_localizations.dart'
;
Future
<
Null
>
main
(
List
<
String
>
rawArgs
)
async
{
Future
<
void
>
main
(
List
<
String
>
rawArgs
)
async
{
checkCwdIsRepoRoot
(
_kCommandName
);
checkCwdIsRepoRoot
(
_kCommandName
);
final
bool
writeToFile
=
parseArgs
(
rawArgs
).
writeToFile
;
final
bool
writeToFile
=
parseArgs
(
rawArgs
).
writeToFile
;
...
...
dev/tools/java_and_objc_doc.dart
View file @
d340e2f2
...
@@ -12,7 +12,7 @@ const String kDocRoot = 'dev/docs/doc';
...
@@ -12,7 +12,7 @@ const String kDocRoot = 'dev/docs/doc';
/// This script downloads an archive of Javadoc and objc doc for the engine from
/// This script downloads an archive of Javadoc and objc doc for the engine from
/// the artifact store and extracts them to the location used for Dartdoc.
/// the artifact store and extracts them to the location used for Dartdoc.
Future
<
Null
>
main
(
List
<
String
>
args
)
async
{
Future
<
void
>
main
(
List
<
String
>
args
)
async
{
final
String
engineVersion
=
File
(
'bin/internal/engine.version'
).
readAsStringSync
().
trim
();
final
String
engineVersion
=
File
(
'bin/internal/engine.version'
).
readAsStringSync
().
trim
();
final
String
javadocUrl
=
'https://storage.googleapis.com/flutter_infra/flutter/
$engineVersion
/android-javadoc.zip'
;
final
String
javadocUrl
=
'https://storage.googleapis.com/flutter_infra/flutter/
$engineVersion
/android-javadoc.zip'
;
...
@@ -22,7 +22,7 @@ Future<Null> main(List<String> args) async {
...
@@ -22,7 +22,7 @@ Future<Null> main(List<String> args) async {
generateDocs
(
objcdocUrl
,
'objcdoc'
,
'Classes/FlutterViewController.html'
);
generateDocs
(
objcdocUrl
,
'objcdoc'
,
'Classes/FlutterViewController.html'
);
}
}
Future
<
Null
>
generateDocs
(
String
url
,
String
docName
,
String
checkFile
)
async
{
Future
<
void
>
generateDocs
(
String
url
,
String
docName
,
String
checkFile
)
async
{
final
http
.
Response
response
=
await
http
.
get
(
url
);
final
http
.
Response
response
=
await
http
.
get
(
url
);
final
Archive
archive
=
ZipDecoder
().
decodeBytes
(
response
.
bodyBytes
);
final
Archive
archive
=
ZipDecoder
().
decodeBytes
(
response
.
bodyBytes
);
...
...
dev/tools/vitool/lib/vitool.dart
View file @
d340e2f2
...
@@ -386,7 +386,7 @@ class SvgPathCommand {
...
@@ -386,7 +386,7 @@ class SvgPathCommand {
}
}
class
SvgPathCommandBuilder
{
class
SvgPathCommandBuilder
{
static
const
Map
<
String
,
Null
>
kRelativeCommands
=
<
String
,
Null
>
{
static
const
Map
<
String
,
void
>
kRelativeCommands
=
<
String
,
void
>
{
'c'
:
null
,
'c'
:
null
,
'l'
:
null
,
'l'
:
null
,
'm'
:
null
,
'm'
:
null
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment