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
0e36a91d
Unverified
Commit
0e36a91d
authored
Nov 20, 2019
by
Jonah Williams
Committed by
GitHub
Nov 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add macOS hot reload test (#45264)
parent
2c7af1e2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
7 deletions
+39
-7
hot_mode_dev_cycle_macos_target__benchmark.dart
...bin/tasks/hot_mode_dev_cycle_macos_target__benchmark.dart
+14
-0
utils.dart
dev/devicelab/lib/framework/utils.dart
+1
-1
hot_mode_tests.dart
dev/devicelab/lib/tasks/hot_mode_tests.dart
+16
-6
manifest.yaml
dev/devicelab/manifest.yaml
+8
-0
No files found.
dev/devicelab/bin/tasks/hot_mode_dev_cycle_macos_target__benchmark.dart
0 → 100644
View file @
0e36a91d
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:async'
;
import
'package:flutter_devicelab/tasks/hot_mode_tests.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
void
>
main
()
async
{
await
task
(
createHotModeTest
(
deviceIdOverride:
'macos'
,
environment:
<
String
,
String
>{
'FLUTTER_MACOS'
:
'true'
,
}));
}
dev/devicelab/lib/framework/utils.dart
View file @
0e36a91d
...
...
@@ -121,7 +121,7 @@ void recursiveCopy(Directory source, Directory target) {
for
(
FileSystemEntity
entity
in
source
.
listSync
(
followLinks:
false
))
{
final
String
name
=
path
.
basename
(
entity
.
path
);
if
(
entity
is
Directory
)
if
(
entity
is
Directory
&&
!
entity
.
path
.
contains
(
'.dart_tool'
)
)
recursiveCopy
(
entity
,
Directory
(
path
.
join
(
target
.
path
,
name
)));
else
if
(
entity
is
File
)
{
final
File
dest
=
File
(
path
.
join
(
target
.
path
,
name
));
...
...
dev/devicelab/lib/tasks/hot_mode_tests.dart
View file @
0e36a91d
...
...
@@ -15,14 +15,17 @@ import '../framework/utils.dart';
final
Directory
_editedFlutterGalleryDir
=
dir
(
path
.
join
(
Directory
.
systemTemp
.
path
,
'edited_flutter_gallery'
));
final
Directory
flutterGalleryDir
=
dir
(
path
.
join
(
flutterDirectory
.
path
,
'examples/flutter_gallery'
));
TaskFunction
createHotModeTest
(
)
{
TaskFunction
createHotModeTest
(
{
String
deviceIdOverride
,
Map
<
String
,
String
>
environment
}
)
{
return
()
async
{
final
Device
device
=
await
devices
.
workingDevice
;
await
device
.
unlock
();
if
(
deviceIdOverride
==
null
)
{
final
Device
device
=
await
devices
.
workingDevice
;
await
device
.
unlock
();
deviceIdOverride
=
device
.
deviceId
;
}
final
File
benchmarkFile
=
file
(
path
.
join
(
_editedFlutterGalleryDir
.
path
,
'hot_benchmark.json'
));
rm
(
benchmarkFile
);
final
List
<
String
>
options
=
<
String
>[
'--hot'
,
'-d'
,
device
.
deviceId
,
'--benchmark'
,
'--verbose'
,
'--resident'
,
'--output-dill'
,
path
.
join
(
'build'
,
'app.dill'
)
'--hot'
,
'-d'
,
device
IdOverride
,
'--benchmark'
,
'--verbose'
,
'--resident'
,
'--output-dill'
,
path
.
join
(
'build'
,
'app.dill'
)
];
int
hotReloadCount
=
0
;
Map
<
String
,
dynamic
>
twoReloadsData
;
...
...
@@ -33,10 +36,17 @@ TaskFunction createHotModeTest() {
recursiveCopy
(
flutterGalleryDir
,
_editedFlutterGalleryDir
);
await
inDirectory
<
void
>(
_editedFlutterGalleryDir
,
()
async
{
{
final
Process
clearProcess
=
await
startProcess
(
path
.
join
(
flutterDirectory
.
path
,
'bin'
,
'flutter'
),
flutterCommandArgs
(
'clean'
,
<
String
>[]),
environment:
environment
,
);
await
clearProcess
.
exitCode
;
final
Process
process
=
await
startProcess
(
path
.
join
(
flutterDirectory
.
path
,
'bin'
,
'flutter'
),
flutterCommandArgs
(
'run'
,
options
),
environment:
null
,
environment:
environment
,
);
final
Completer
<
void
>
stdoutDone
=
Completer
<
void
>();
...
...
@@ -90,7 +100,7 @@ TaskFunction createHotModeTest() {
final
Process
process
=
await
startProcess
(
path
.
join
(
flutterDirectory
.
path
,
'bin'
,
'flutter'
),
flutterCommandArgs
(
'run'
,
options
),
environment:
null
,
environment:
environment
,
);
final
Completer
<
void
>
stdoutDone
=
Completer
<
void
>();
final
Completer
<
void
>
stderrDone
=
Completer
<
void
>();
...
...
dev/devicelab/manifest.yaml
View file @
0e36a91d
...
...
@@ -566,6 +566,14 @@ tasks:
stage
:
devicelab
required_agent_capabilities
:
[
"
mac-catalina/android"
]
# macOS target platform tests
hot_mode_dev_cycle_macos_target__benchmark
:
description
:
>
Checks the functionality and performance of hot reload on a macOS target platform
stage
:
devicelab
required_agent_capabilities
:
[
"
mac/ios"
]
flaky
:
true
# Tests running on Windows host
flavors_test_win
:
...
...
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