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
8ca55605
Unverified
Commit
8ca55605
authored
Dec 12, 2019
by
Jonah Williams
Committed by
GitHub
Dec 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tool] forward device-vmservice-port to iOS device launch arguments (#46822)
parent
592a842b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
2 deletions
+48
-2
devices.dart
packages/flutter_tools/lib/src/ios/devices.dart
+2
-0
devices_test.dart
...es/flutter_tools/test/general.shard/ios/devices_test.dart
+46
-2
No files found.
packages/flutter_tools/lib/src/ios/devices.dart
View file @
8ca55605
...
...
@@ -345,6 +345,8 @@ class IOSDevice extends Device {
if
(
debuggingOptions
.
dumpSkpOnShaderCompilation
)
'--dump-skp-on-shader-compilation'
,
if
(
debuggingOptions
.
verboseSystemLogs
)
'--verbose-logging'
,
if
(
debuggingOptions
.
cacheSkSL
)
'--cache-sksl'
,
if
(
debuggingOptions
.
deviceVmServicePort
!=
null
)
'--observatory-port=
${debuggingOptions.deviceVmServicePort}
'
,
if
(
platformArgs
[
'trace-startup'
]
as
bool
??
false
)
'--trace-startup'
,
];
...
...
packages/flutter_tools/test/general.shard/ios/devices_test.dart
View file @
8ca55605
...
...
@@ -410,7 +410,7 @@ void main() {
Usage:
()
=>
mockUsage
,
});
testUsingContext
(
'
succeeds in release mode'
,
()
async
{
testUsingContext
(
'succeeds in release mode'
,
()
async
{
final
IOSDevice
device
=
IOSDevice
(
'123'
);
final
LaunchResult
launchResult
=
await
device
.
startApp
(
mockApp
,
prebuiltApplication:
true
,
...
...
@@ -428,7 +428,7 @@ void main() {
ProcessManager:
()
=>
mockProcessManager
,
});
testUsingContext
(
'
succeeds with --cache-sksl'
,
()
async
{
testUsingContext
(
'succeeds with --cache-sksl'
,
()
async
{
final
IOSDevice
device
=
IOSDevice
(
'123'
);
device
.
setLogReader
(
mockApp
,
mockLogReader
);
final
Uri
uri
=
Uri
(
...
...
@@ -472,6 +472,50 @@ void main() {
IOSDeploy:
()
=>
mockIosDeploy
,
});
testUsingContext
(
'succeeds with --device-vmservice-port'
,
()
async
{
final
IOSDevice
device
=
IOSDevice
(
'123'
);
device
.
setLogReader
(
mockApp
,
mockLogReader
);
final
Uri
uri
=
Uri
(
scheme:
'http'
,
host:
'127.0.0.1'
,
port:
1234
,
path:
'observatory'
,
);
when
(
mockMDnsObservatoryDiscovery
.
getObservatoryUri
(
any
,
any
,
usesIpv6:
anyNamed
(
'usesIpv6'
)))
.
thenAnswer
((
Invocation
invocation
)
=>
Future
<
Uri
>.
value
(
uri
));
List
<
String
>
args
;
when
(
mockIosDeploy
.
runApp
(
deviceId:
anyNamed
(
'deviceId'
),
bundlePath:
anyNamed
(
'bundlePath'
),
launchArguments:
anyNamed
(
'launchArguments'
),
)).
thenAnswer
((
Invocation
inv
)
{
args
=
inv
.
namedArguments
[
const
Symbol
(
'launchArguments'
)]
as
List
<
String
>;
return
Future
<
int
>.
value
(
0
);
});
final
LaunchResult
launchResult
=
await
device
.
startApp
(
mockApp
,
prebuiltApplication:
true
,
debuggingOptions:
DebuggingOptions
.
enabled
(
const
BuildInfo
(
BuildMode
.
debug
,
null
),
deviceVmServicePort:
8181
,
),
platformArgs:
<
String
,
dynamic
>{},
);
expect
(
launchResult
.
started
,
isTrue
);
expect
(
args
,
contains
(
'--observatory-port=8181'
));
expect
(
await
device
.
stopApp
(
mockApp
),
isFalse
);
},
overrides:
<
Type
,
Generator
>{
Artifacts:
()
=>
mockArtifacts
,
Cache:
()
=>
mockCache
,
FileSystem:
()
=>
mockFileSystem
,
MDnsObservatoryDiscovery:
()
=>
mockMDnsObservatoryDiscovery
,
Platform:
()
=>
macPlatform
,
ProcessManager:
()
=>
mockProcessManager
,
Usage:
()
=>
mockUsage
,
IOSDeploy:
()
=>
mockIosDeploy
,
});
void
testNonPrebuilt
(
String
name
,
{
@required
bool
showBuildSettingsFlakes
,
...
...
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