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
b84ac50d
Unverified
Commit
b84ac50d
authored
May 29, 2019
by
Zachary Anderson
Committed by
GitHub
May 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tool] Misc. fixes for Fuchsia (#33466)
parent
c1d448f3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
fuchsia_dev_finder.dart
...ges/flutter_tools/lib/src/fuchsia/fuchsia_dev_finder.dart
+4
-2
fuchsia_device.dart
packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
+1
-1
fuchsia_sdk.dart
packages/flutter_tools/lib/src/fuchsia/fuchsia_sdk.dart
+5
-3
fuchsa_device_test.dart
packages/flutter_tools/test/fuchsia/fuchsa_device_test.dart
+2
-0
No files found.
packages/flutter_tools/lib/src/fuchsia/fuchsia_dev_finder.dart
View file @
b84ac50d
...
...
@@ -23,7 +23,8 @@ class FuchsiaDevFinder {
/// formatted as follows:
/// 192.168.42.172 scare-cable-skip-joy
Future
<
List
<
String
>>
list
()
async
{
if
(
fuchsiaArtifacts
.
devFinder
==
null
)
{
if
(
fuchsiaArtifacts
.
devFinder
==
null
||
!
fuchsiaArtifacts
.
devFinder
.
existsSync
())
{
throwToolExit
(
'Fuchsia dev_finder tool not found.'
);
}
final
List
<
String
>
command
=
<
String
>[
...
...
@@ -45,7 +46,8 @@ class FuchsiaDevFinder {
/// The string [deviceName] should be the name of the device from the
/// 'list' command, e.g. 'scare-cable-skip-joy'.
Future
<
String
>
resolve
(
String
deviceName
)
async
{
if
(
fuchsiaArtifacts
.
devFinder
==
null
)
{
if
(
fuchsiaArtifacts
.
devFinder
==
null
||
!
fuchsiaArtifacts
.
devFinder
.
existsSync
())
{
throwToolExit
(
'Fuchsia dev_finder tool not found.'
);
}
final
List
<
String
>
command
=
<
String
>[
...
...
packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
View file @
b84ac50d
...
...
@@ -378,7 +378,7 @@ class FuchsiaDevice extends Device {
const
String
findCommand
=
'find /hub -name vmservice-port'
;
final
RunResult
findResult
=
await
shell
(
findCommand
);
if
(
findResult
.
exitCode
!=
0
)
{
throwToolExit
(
"'
$findCommand
' on device
$id
failed"
);
throwToolExit
(
"'
$findCommand
' on device
$id
failed
. stderr: '
${findResult.stderr}
'
"
);
return
null
;
}
final
String
findOutput
=
findResult
.
stdout
;
...
...
packages/flutter_tools/lib/src/fuchsia/fuchsia_sdk.dart
View file @
b84ac50d
...
...
@@ -46,7 +46,8 @@ class FuchsiaSdk {
/// $ dev_finder list -full
/// > 192.168.42.56 paper-pulp-bush-angel
Future
<
String
>
listDevices
()
async
{
if
(
fuchsiaArtifacts
.
devFinder
==
null
)
{
if
(
fuchsiaArtifacts
.
devFinder
==
null
||
!
fuchsiaArtifacts
.
devFinder
.
existsSync
())
{
return
null
;
}
final
List
<
String
>
devices
=
await
fuchsiaDevFinder
.
list
();
...
...
@@ -64,7 +65,8 @@ class FuchsiaSdk {
StreamController
<
String
>(
onCancel:
()
{
process
.
kill
();
});
if
(
fuchsiaArtifacts
.
sshConfig
==
null
)
{
if
(
fuchsiaArtifacts
.
sshConfig
==
null
||
!
fuchsiaArtifacts
.
sshConfig
.
existsSync
())
{
printError
(
'Cannot read device logs: No ssh config.'
);
printError
(
'Have you set FUCHSIA_SSH_CONFIG or FUCHSIA_BUILD_DIR?'
);
return
null
;
...
...
@@ -91,7 +93,7 @@ class FuchsiaSdk {
}
catch
(
exception
)
{
printTrace
(
'
$exception
'
);
}
return
null
;
return
const
Stream
<
String
>.
empty
()
;
}
}
...
...
packages/flutter_tools/test/fuchsia/fuchsa_device_test.dart
View file @
b84ac50d
...
...
@@ -240,6 +240,8 @@ void main() {
when
(
mockProcess
.
stderr
).
thenAnswer
((
Invocation
_
)
=>
stderr
.
stream
);
devFinder
=
MockFile
();
sshConfig
=
MockFile
();
when
(
devFinder
.
existsSync
()).
thenReturn
(
true
);
when
(
sshConfig
.
existsSync
()).
thenReturn
(
true
);
when
(
devFinder
.
absolute
).
thenReturn
(
devFinder
);
when
(
sshConfig
.
absolute
).
thenReturn
(
sshConfig
);
});
...
...
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