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
376cb2eb
Commit
376cb2eb
authored
May 18, 2016
by
Chinmay Garde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Attach standard streams of the child sky_shell process so that logs from the shell show up. (#4024)
parent
07719ad5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
flutter_platform.dart
packages/flutter_tools/lib/src/test/flutter_platform.dart
+14
-0
No files found.
packages/flutter_tools/lib/src/test/flutter_platform.dart
View file @
376cb2eb
...
...
@@ -54,6 +54,18 @@ Future<Process> _startProcess(String mainPath, { String packages }) {
],
environment:
<
String
,
String
>{
'FLUTTER_TEST'
:
'true'
});
}
void
_attachStandardStreams
(
Process
process
)
{
for
(
Stream
<
List
<
int
>>
stream
in
<
Stream
<
List
<
int
>>>[
process
.
stderr
,
process
.
stdout
])
{
stream
.
transform
(
UTF8
.
decoder
)
.
transform
(
const
LineSplitter
())
.
listen
((
String
line
)
{
if
(
line
!=
null
)
print
(
'Shell:
$line
'
);
});
}
}
class
FlutterPlatform
extends
PlatformPlugin
{
@override
StreamChannel
<
String
>
loadChannel
(
String
mainPath
,
TestPlatform
platform
)
{
...
...
@@ -93,6 +105,8 @@ void main() {
listenerFile
.
path
,
packages:
PackageMap
.
instance
.
packagesPath
);
_attachStandardStreams
(
process
);
void
finalize
()
{
if
(
process
!=
null
)
{
Process
processToKill
=
process
;
...
...
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