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
33cd720d
Unverified
Commit
33cd720d
authored
Jan 22, 2019
by
Andrew Davies
Committed by
GitHub
Jan 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[frdp] Adds paths for `find` and `ls` for Fuchsia execution. (#26680)
Adds full path for `find` and `ls` commands.
parent
f777db2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
fuchsia_remote_connection.dart
...ote_debug_protocol/lib/src/fuchsia_remote_connection.dart
+4
-3
fuchsia_remote_connection_test.dart
...e_debug_protocol/test/fuchsia_remote_connection_test.dart
+6
-4
No files found.
packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart
View file @
33cd720d
...
@@ -523,14 +523,15 @@ class FuchsiaRemoteConnection {
...
@@ -523,14 +523,15 @@ class FuchsiaRemoteConnection {
/// found. An exception is thrown in the event of an actual error when
/// found. An exception is thrown in the event of an actual error when
/// attempting to acquire the ports.
/// attempting to acquire the ports.
Future
<
List
<
int
>>
getDeviceServicePorts
()
async
{
Future
<
List
<
int
>>
getDeviceServicePorts
()
async
{
final
List
<
String
>
portPaths
=
final
List
<
String
>
portPaths
=
await
_sshCommandRunner
await
_sshCommandRunner
.
run
(
'
find /hub -name vmservice-port'
);
.
run
(
'/system/bin/
find /hub -name vmservice-port'
);
final
List
<
int
>
ports
=
<
int
>[];
final
List
<
int
>
ports
=
<
int
>[];
for
(
String
path
in
portPaths
)
{
for
(
String
path
in
portPaths
)
{
if
(
path
==
''
)
{
if
(
path
==
''
)
{
continue
;
continue
;
}
}
final
List
<
String
>
lsOutput
=
await
_sshCommandRunner
.
run
(
'ls
$path
'
);
final
List
<
String
>
lsOutput
=
await
_sshCommandRunner
.
run
(
'/system/bin/ls
$path
'
);
for
(
String
line
in
lsOutput
)
{
for
(
String
line
in
lsOutput
)
{
if
(
line
==
''
)
{
if
(
line
==
''
)
{
continue
;
continue
;
...
...
packages/fuchsia_remote_debug_protocol/test/fuchsia_remote_connection_test.dart
View file @
33cd720d
...
@@ -21,10 +21,12 @@ void main() {
...
@@ -21,10 +21,12 @@ void main() {
setUp
(()
{
setUp
(()
{
mockRunner
=
MockSshCommandRunner
();
mockRunner
=
MockSshCommandRunner
();
// Adds some extra junk to make sure the strings will be cleaned up.
// Adds some extra junk to make sure the strings will be cleaned up.
when
(
mockRunner
.
run
(
argThat
(
startsWith
(
'find'
)))).
thenAnswer
((
_
)
=>
when
(
mockRunner
.
run
(
argThat
(
startsWith
(
'/system/bin/find'
)))).
thenAnswer
(
Future
<
List
<
String
>>.
value
(<
String
>[
'/hub/blah/blah/blah/vmservice-port
\n
'
]));
(
_
)
=>
Future
<
List
<
String
>>.
value
(
when
(
mockRunner
.
run
(
argThat
(
startsWith
(
'ls'
)))).
thenAnswer
((
_
)
=>
<
String
>[
'/hub/blah/blah/blah/vmservice-port
\n
'
]));
Future
<
List
<
String
>>.
value
(<
String
>[
'123
\n\n\n
'
,
'456 '
,
'789'
]));
when
(
mockRunner
.
run
(
argThat
(
startsWith
(
'/system/bin/ls'
)))).
thenAnswer
(
(
_
)
=>
Future
<
List
<
String
>>.
value
(
<
String
>[
'123
\n\n\n
'
,
'456 '
,
'789'
]));
const
String
address
=
'fe80::8eae:4cff:fef4:9247'
;
const
String
address
=
'fe80::8eae:4cff:fef4:9247'
;
const
String
interface
=
'
eno1
';
const
String
interface
=
'
eno1
';
when(mockRunner.address).thenReturn(address);
when(mockRunner.address).thenReturn(address);
...
...
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