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
63a40131
Unverified
Commit
63a40131
authored
Jul 13, 2021
by
Jonah Williams
Committed by
GitHub
Jul 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "[flutter_tools] let the logger know about machine mode (#86116)" (#86363)
This reverts commit
53d8cba3
.
parent
28b4b84f
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
22 additions
and
155 deletions
+22
-155
executable.dart
packages/flutter_tools/lib/executable.dart
+6
-11
runner.dart
packages/flutter_tools/lib/runner.dart
+0
-1
logger.dart
packages/flutter_tools/lib/src/base/logger.dart
+0
-19
context_runner.dart
packages/flutter_tools/lib/src/context_runner.dart
+0
-2
analyze_continuously_test.dart
...st/commands.shard/hermetic/analyze_continuously_test.dart
+1
-1
attach_test.dart
...utter_tools/test/commands.shard/hermetic/attach_test.dart
+0
-3
artifact_updater_test.dart
...utter_tools/test/general.shard/artifact_updater_test.dart
+0
-1
logger_test.dart
...es/flutter_tools/test/general.shard/base/logger_test.dart
+15
-110
terminal_test.dart
.../flutter_tools/test/general.shard/base/terminal_test.dart
+0
-4
cmake_project_migration_test.dart
...eneral.shard/migrations/cmake_project_migration_test.dart
+0
-1
downgrade_upgrade_integration_test.dart
...integration.shard/downgrade_upgrade_integration_test.dart
+0
-1
testbed.dart
packages/flutter_tools/test/src/testbed.dart
+0
-1
No files found.
packages/flutter_tools/lib/executable.dart
View file @
63a40131
...
...
@@ -77,9 +77,8 @@ Future<void> main(List<String> args) async {
final
bool
muteCommandLogging
=
(
help
||
doctor
)
&&
!
veryVerbose
;
final
bool
verboseHelp
=
help
&&
verbose
;
final
bool
daemon
=
args
.
contains
(
'daemon'
);
final
bool
machine
=
args
.
contains
(
'--machine'
);
final
bool
runMachine
=
(
machine
&&
args
.
contains
(
'run'
))
||
(
machine
&&
args
.
contains
(
'attach'
));
final
bool
runMachine
=
(
args
.
contains
(
'--machine'
)
&&
args
.
contains
(
'run'
))
||
(
args
.
contains
(
'--machine'
)
&&
args
.
contains
(
'attach'
));
// Cache.flutterRoot must be set early because other features use it (e.g.
// enginePath's initializer uses it). This can only work with the real
...
...
@@ -123,11 +122,10 @@ Future<void> main(List<String> args) async {
);
return
loggerFactory
.
createLogger
(
daemon:
daemon
,
runM
achine:
runMachine
,
m
achine:
runMachine
,
verbose:
verbose
&&
!
muteCommandLogging
,
prefixedErrors:
prefixedErrors
,
windows:
globals
.
platform
.
isWindows
,
machine:
machine
,
);
},
},
...
...
@@ -228,10 +226,9 @@ class LoggerFactory {
Logger
createLogger
({
@required
bool
verbose
,
@required
bool
prefixedErrors
,
@required
bool
runM
achine
,
@required
bool
m
achine
,
@required
bool
daemon
,
@required
bool
windows
,
@required
bool
machine
,
})
{
Logger
logger
;
if
(
windows
)
{
...
...
@@ -240,15 +237,13 @@ class LoggerFactory {
stdio:
_stdio
,
outputPreferences:
_outputPreferences
,
stopwatchFactory:
_stopwatchFactory
,
machine:
machine
,
);
}
else
{
logger
=
StdoutLogger
(
terminal:
_terminal
,
stdio:
_stdio
,
outputPreferences:
_outputPreferences
,
stopwatchFactory:
_stopwatchFactory
,
machine:
machine
,
stopwatchFactory:
_stopwatchFactory
);
}
if
(
verbose
)
{
...
...
@@ -260,7 +255,7 @@ class LoggerFactory {
if
(
daemon
)
{
return
NotifyingLogger
(
verbose:
verbose
,
parent:
logger
);
}
if
(
runM
achine
)
{
if
(
m
achine
)
{
return
AppRunLogger
(
parent:
logger
);
}
return
logger
;
...
...
packages/flutter_tools/lib/runner.dart
View file @
63a40131
...
...
@@ -226,7 +226,6 @@ Future<String> _doctorText() async {
final
BufferLogger
logger
=
BufferLogger
(
terminal:
globals
.
terminal
,
outputPreferences:
globals
.
outputPreferences
,
machine:
false
,
);
final
Doctor
doctor
=
Doctor
(
logger:
logger
);
...
...
packages/flutter_tools/lib/src/base/logger.dart
View file @
63a40131
...
...
@@ -36,12 +36,6 @@ abstract class Logger {
bool
get
hasTerminal
;
/// Whether the current flutter command invocation also contains a `--machine` flag.
///
/// This should be used to elide output to stdout that is not formatted in newline
/// delimited JSON.
bool
get
machine
;
Terminal
get
terminal
;
OutputPreferences
get
_outputPreferences
;
...
...
@@ -165,9 +159,6 @@ class DelegatingLogger implements Logger {
@override
bool
get
quiet
=>
_delegate
.
quiet
;
@override
bool
get
machine
=>
_delegate
.
machine
;
@override
set
quiet
(
bool
value
)
=>
_delegate
.
quiet
=
value
;
...
...
@@ -278,7 +269,6 @@ class StdoutLogger extends Logger {
required
this
.
terminal
,
required
Stdio
stdio
,
required
OutputPreferences
outputPreferences
,
required
this
.
machine
,
StopwatchFactory
stopwatchFactory
=
const
StopwatchFactory
(),
})
:
_stdio
=
stdio
,
...
...
@@ -289,8 +279,6 @@ class StdoutLogger extends Logger {
final
Terminal
terminal
;
@override
final
OutputPreferences
_outputPreferences
;
@override
final
bool
machine
;
final
Stdio
_stdio
;
final
StopwatchFactory
_stopwatchFactory
;
...
...
@@ -455,14 +443,12 @@ class WindowsStdoutLogger extends StdoutLogger {
required
Terminal
terminal
,
required
Stdio
stdio
,
required
OutputPreferences
outputPreferences
,
required
bool
machine
,
StopwatchFactory
stopwatchFactory
=
const
StopwatchFactory
(),
})
:
super
(
terminal:
terminal
,
stdio:
stdio
,
outputPreferences:
outputPreferences
,
stopwatchFactory:
stopwatchFactory
,
machine:
machine
,
);
@override
...
...
@@ -484,7 +470,6 @@ class BufferLogger extends Logger {
BufferLogger
({
required
this
.
terminal
,
required
OutputPreferences
outputPreferences
,
this
.
machine
=
false
,
StopwatchFactory
stopwatchFactory
=
const
StopwatchFactory
(),
})
:
_outputPreferences
=
outputPreferences
,
_stopwatchFactory
=
stopwatchFactory
;
...
...
@@ -493,7 +478,6 @@ class BufferLogger extends Logger {
BufferLogger
.
test
({
Terminal
?
terminal
,
OutputPreferences
?
outputPreferences
,
this
.
machine
=
false
,
})
:
terminal
=
terminal
??
Terminal
.
test
(),
_outputPreferences
=
outputPreferences
??
OutputPreferences
.
test
(),
_stopwatchFactory
=
const
StopwatchFactory
();
...
...
@@ -505,9 +489,6 @@ class BufferLogger extends Logger {
@override
final
Terminal
terminal
;
@override
final
bool
machine
;
final
StopwatchFactory
_stopwatchFactory
;
@override
...
...
packages/flutter_tools/lib/src/context_runner.dart
View file @
63a40131
...
...
@@ -274,13 +274,11 @@ Future<T> runInContext<T>(
terminal:
globals
.
terminal
,
stdio:
globals
.
stdio
,
outputPreferences:
globals
.
outputPreferences
,
machine:
false
,
)
:
StdoutLogger
(
terminal:
globals
.
terminal
,
stdio:
globals
.
stdio
,
outputPreferences:
globals
.
outputPreferences
,
machine:
false
,
),
MacOSWorkflow:
()
=>
MacOSWorkflow
(
featureFlags:
featureFlags
,
...
...
packages/flutter_tools/test/commands.shard/hermetic/analyze_continuously_test.dart
View file @
63a40131
...
...
@@ -44,7 +44,7 @@ void main() {
platform
=
const
LocalPlatform
();
processManager
=
const
LocalProcessManager
();
terminal
=
AnsiTerminal
(
platform:
platform
,
stdio:
Stdio
());
logger
=
BufferLogger
(
outputPreferences:
OutputPreferences
.
test
(),
terminal:
terminal
,
machine:
false
);
logger
=
BufferLogger
(
outputPreferences:
OutputPreferences
.
test
(),
terminal:
terminal
);
tempDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'flutter_analysis_test.'
);
});
...
...
packages/flutter_tools/test/commands.shard/hermetic/attach_test.dart
View file @
63a40131
...
...
@@ -558,9 +558,6 @@ class StreamLogger extends Logger {
@override
bool
get
isVerbose
=>
true
;
@override
bool
get
machine
=>
true
;
@override
void
printError
(
String
message
,
{
...
...
packages/flutter_tools/test/general.shard/artifact_updater_test.dart
View file @
63a40131
...
...
@@ -186,7 +186,6 @@ void main() {
terminal:
Terminal
.
test
(
supportsColor:
true
),
stdio:
FakeStdio
(),
outputPreferences:
OutputPreferences
.
test
(),
machine:
false
,
);
final
ArtifactUpdater
artifactUpdater
=
ArtifactUpdater
(
fileSystem:
fileSystem
,
...
...
packages/flutter_tools/test/general.shard/base/logger_test.dart
View file @
63a40131
...
...
@@ -26,7 +26,7 @@ final String resetBold = RegExp.escape(AnsiTerminal.resetBold);
final
String
resetColor
=
RegExp
.
escape
(
AnsiTerminal
.
resetColor
);
void
main
(
)
{
testWithoutContext
(
'correct logger instance is created
with machine: false
'
,
()
{
testWithoutContext
(
'correct logger instance is created'
,
()
{
final
LoggerFactory
loggerFactory
=
LoggerFactory
(
terminal:
Terminal
.
test
(),
stdio:
FakeStdio
(),
...
...
@@ -36,124 +36,52 @@ void main() {
expect
(
loggerFactory
.
createLogger
(
verbose:
false
,
prefixedErrors:
false
,
runMachine:
false
,
daemon:
false
,
windows:
false
,
machine:
false
),
isA
<
StdoutLogger
>().
having
((
Logger
logger
)
=>
logger
.
machine
,
'machine'
,
false
));
expect
(
loggerFactory
.
createLogger
(
verbose:
false
,
prefixedErrors:
false
,
runMachine:
false
,
daemon:
false
,
windows:
true
,
machine:
false
),
isA
<
WindowsStdoutLogger
>().
having
((
Logger
logger
)
=>
logger
.
machine
,
'machine'
,
false
));
expect
(
loggerFactory
.
createLogger
(
verbose:
true
,
prefixedErrors:
false
,
runMachine:
false
,
daemon:
false
,
windows:
true
,
machine:
false
),
isA
<
VerboseLogger
>().
having
((
Logger
logger
)
=>
logger
.
machine
,
'machine'
,
false
));
expect
(
loggerFactory
.
createLogger
(
verbose:
true
,
prefixedErrors:
false
,
runMachine:
false
,
daemon:
false
,
windows:
false
,
machine:
false
),
isA
<
VerboseLogger
>().
having
((
Logger
logger
)
=>
logger
.
machine
,
'machine'
,
false
));
expect
(
loggerFactory
.
createLogger
(
verbose:
false
,
prefixedErrors:
true
,
runMachine:
false
,
daemon:
false
,
windows:
false
,
machine:
false
),
isA
<
PrefixedErrorLogger
>().
having
((
Logger
logger
)
=>
logger
.
machine
,
'machine'
,
false
));
expect
(
loggerFactory
.
createLogger
(
verbose:
false
,
prefixedErrors:
false
,
runMachine:
false
,
daemon:
true
,
windows:
false
,
machine:
false
),
isA
<
NotifyingLogger
>().
having
((
Logger
logger
)
=>
logger
.
machine
,
'machine'
,
false
));
expect
(
loggerFactory
.
createLogger
(
verbose:
false
,
prefixedErrors:
false
,
runMachine:
true
,
daemon:
false
,
windows:
false
,
machine:
false
),
isA
<
AppRunLogger
>().
having
((
Logger
logger
)
=>
logger
.
machine
,
'machine'
,
false
));
});
testWithoutContext
(
'correct logger instance is created with machine: true'
,
()
{
final
LoggerFactory
loggerFactory
=
LoggerFactory
(
terminal:
Terminal
.
test
(),
stdio:
FakeStdio
(),
outputPreferences:
OutputPreferences
.
test
(),
);
expect
(
loggerFactory
.
createLogger
(
verbose:
false
,
prefixedErrors:
false
,
runMachine:
false
,
machine:
false
,
daemon:
false
,
windows:
false
,
machine:
true
),
isA
<
StdoutLogger
>().
having
((
Logger
logger
)
=>
logger
.
machine
,
'machine'
,
true
));
),
isA
<
StdoutLogger
>());
expect
(
loggerFactory
.
createLogger
(
verbose:
false
,
prefixedErrors:
false
,
runM
achine:
false
,
m
achine:
false
,
daemon:
false
,
windows:
true
,
machine:
true
),
isA
<
WindowsStdoutLogger
>().
having
((
Logger
logger
)
=>
logger
.
machine
,
'machine'
,
true
));
),
isA
<
WindowsStdoutLogger
>());
expect
(
loggerFactory
.
createLogger
(
verbose:
true
,
prefixedErrors:
false
,
runM
achine:
false
,
m
achine:
false
,
daemon:
false
,
windows:
true
,
machine:
true
),
isA
<
VerboseLogger
>().
having
((
Logger
logger
)
=>
logger
.
machine
,
'machine'
,
true
));
),
isA
<
VerboseLogger
>());
expect
(
loggerFactory
.
createLogger
(
verbose:
true
,
prefixedErrors:
false
,
runM
achine:
false
,
m
achine:
false
,
daemon:
false
,
windows:
false
,
machine:
true
),
isA
<
VerboseLogger
>().
having
((
Logger
logger
)
=>
logger
.
machine
,
'machine'
,
true
));
),
isA
<
VerboseLogger
>());
expect
(
loggerFactory
.
createLogger
(
verbose:
false
,
prefixedErrors:
true
,
runM
achine:
false
,
m
achine:
false
,
daemon:
false
,
windows:
false
,
machine:
true
),
isA
<
PrefixedErrorLogger
>().
having
((
Logger
logger
)
=>
logger
.
machine
,
'machine'
,
true
));
),
isA
<
PrefixedErrorLogger
>());
expect
(
loggerFactory
.
createLogger
(
verbose:
false
,
prefixedErrors:
false
,
runM
achine:
false
,
m
achine:
false
,
daemon:
true
,
windows:
false
,
machine:
true
),
isA
<
NotifyingLogger
>().
having
((
Logger
logger
)
=>
logger
.
machine
,
'machine'
,
true
));
),
isA
<
NotifyingLogger
>());
expect
(
loggerFactory
.
createLogger
(
verbose:
false
,
prefixedErrors:
false
,
runM
achine:
true
,
m
achine:
true
,
daemon:
false
,
windows:
false
,
machine:
true
),
isA
<
AppRunLogger
>().
having
((
Logger
logger
)
=>
logger
.
machine
,
'machine'
,
true
));
),
isA
<
AppRunLogger
>());
});
testWithoutContext
(
'WindowsStdoutLogger rewrites emojis when terminal does not support emoji'
,
()
{
...
...
@@ -162,7 +90,6 @@ void main() {
outputPreferences:
OutputPreferences
.
test
(),
stdio:
stdio
,
terminal:
Terminal
.
test
(
supportsColor:
false
,
supportsEmoji:
false
),
machine:
false
,
);
logger
.
printStatus
(
'🔥🖼️✗✓🔨💪✏️'
);
...
...
@@ -176,7 +103,6 @@ void main() {
outputPreferences:
OutputPreferences
.
test
(),
stdio:
stdio
,
terminal:
Terminal
.
test
(
supportsColor:
true
,
supportsEmoji:
true
),
machine:
false
,
);
logger
.
printStatus
(
'🔥🖼️✗✓🔨💪✏️'
);
...
...
@@ -369,7 +295,6 @@ void main() {
),
stdio:
stdio
,
outputPreferences:
OutputPreferences
.
test
(),
machine:
false
,
);
logger
.
printStatus
(
'message'
);
...
...
@@ -387,7 +312,6 @@ void main() {
),
stdio:
stdio
,
outputPreferences:
OutputPreferences
.
test
(),
machine:
false
,
);
logger
.
printStatus
(
'message'
);
logger
.
printError
(
'error message'
);
...
...
@@ -407,7 +331,6 @@ void main() {
),
stdio:
stdio
,
outputPreferences:
OutputPreferences
.
test
(),
machine:
false
,
);
logger
.
printStatus
(
'message'
);
logger
.
printError
(
'error message'
);
...
...
@@ -538,7 +461,6 @@ void main() {
stdio:
mockStdio
,
outputPreferences:
OutputPreferences
.
test
(
showColor:
true
),
stopwatchFactory:
stopwatchFactory
,
machine:
false
,
);
final
Status
status
=
logger
.
startProgress
(
'Hello'
,
...
...
@@ -576,7 +498,6 @@ void main() {
stdio:
mockStdio
,
outputPreferences:
OutputPreferences
.
test
(
showColor:
true
),
stopwatchFactory:
stopwatchFactory
,
machine:
false
,
);
const
String
message
=
"Knock Knock, Who's There"
;
final
Status
status
=
logger
.
startProgress
(
...
...
@@ -618,7 +539,6 @@ void main() {
stdio:
mockStdio
,
outputPreferences:
OutputPreferences
.
test
(
showColor:
true
),
stopwatchFactory:
stopwatchFactory
,
machine:
false
,
);
const
String
message
=
"Knock Knock, Who's There"
;
final
Status
status
=
logger
.
startProgress
(
...
...
@@ -751,7 +671,6 @@ void main() {
),
stdio:
fakeStdio
,
outputPreferences:
OutputPreferences
.
test
(
wrapText:
true
,
wrapColumn:
40
,
showColor:
false
),
machine:
false
,
);
logger
.
printError
(
'0123456789'
*
15
);
final
List
<
String
>
lines
=
outputStderr
();
...
...
@@ -780,7 +699,6 @@ void main() {
platform:
_kNoAnsiPlatform
,
),
stdio:
fakeStdio
,
machine:
false
,
outputPreferences:
OutputPreferences
.
test
(
wrapText:
true
,
wrapColumn:
40
,
showColor:
false
),
);
logger
.
printError
(
'0123456789'
*
15
,
indent:
5
);
...
...
@@ -804,7 +722,6 @@ void main() {
platform:
_kNoAnsiPlatform
,
),
stdio:
fakeStdio
,
machine:
false
,
outputPreferences:
OutputPreferences
.
test
(
wrapText:
true
,
wrapColumn:
40
,
showColor:
false
),
);
logger
.
printError
(
'0123456789'
*
15
,
hangingIndent:
5
);
...
...
@@ -828,7 +745,6 @@ void main() {
platform:
_kNoAnsiPlatform
,
),
stdio:
fakeStdio
,
machine:
false
,
outputPreferences:
OutputPreferences
.
test
(
wrapText:
true
,
wrapColumn:
40
,
showColor:
false
),
);
logger
.
printError
(
'0123456789'
*
15
,
indent:
4
,
hangingIndent:
5
);
...
...
@@ -852,7 +768,6 @@ void main() {
platform:
_kNoAnsiPlatform
,
),
stdio:
fakeStdio
,
machine:
false
,
outputPreferences:
OutputPreferences
.
test
(
wrapText:
true
,
wrapColumn:
40
,
showColor:
false
),
);
logger
.
printStatus
(
'0123456789'
*
15
);
...
...
@@ -874,7 +789,6 @@ void main() {
),
stdio:
fakeStdio
,
outputPreferences:
OutputPreferences
.
test
(
wrapText:
true
,
wrapColumn:
40
,
showColor:
false
),
machine:
false
,
);
logger
.
printStatus
(
'0123456789'
*
15
,
indent:
5
);
final
List
<
String
>
lines
=
outputStdout
();
...
...
@@ -897,7 +811,6 @@ void main() {
platform:
_kNoAnsiPlatform
,
),
stdio:
fakeStdio
,
machine:
false
,
outputPreferences:
OutputPreferences
.
test
(
wrapText:
true
,
wrapColumn:
40
,
showColor:
false
)
);
logger
.
printStatus
(
'0123456789'
*
15
,
hangingIndent:
5
);
...
...
@@ -921,7 +834,6 @@ void main() {
platform:
_kNoAnsiPlatform
,
),
stdio:
fakeStdio
,
machine:
false
,
outputPreferences:
OutputPreferences
.
test
(
wrapText:
true
,
wrapColumn:
40
,
showColor:
false
),
);
logger
.
printStatus
(
'0123456789'
*
15
,
indent:
4
,
hangingIndent:
5
);
...
...
@@ -945,7 +857,6 @@ void main() {
platform:
FakePlatform
(
stdoutSupportsAnsi:
true
),
),
stdio:
fakeStdio
,
machine:
false
,
outputPreferences:
OutputPreferences
.
test
(
showColor:
true
),
);
logger
.
printError
(
'Pants on fire!'
);
...
...
@@ -963,7 +874,6 @@ void main() {
platform:
FakePlatform
(),
),
stdio:
fakeStdio
,
machine:
false
,
outputPreferences:
OutputPreferences
.
test
(
showColor:
true
),
);
logger
.
printStatus
(
'All good.'
);
...
...
@@ -982,7 +892,6 @@ void main() {
),
stdio:
fakeStdio
,
outputPreferences:
OutputPreferences
.
test
(
showColor:
true
),
machine:
false
,
);
logger
.
printStatus
(
null
,
...
...
@@ -1006,7 +915,6 @@ void main() {
),
stdio:
fakeStdio
,
outputPreferences:
OutputPreferences
.
test
(
showColor:
false
),
machine:
false
,
);
logger
.
printStatus
(
null
,
...
...
@@ -1031,7 +939,6 @@ void main() {
stdio:
fakeStdio
,
outputPreferences:
OutputPreferences
.
test
(
showColor:
false
),
stopwatchFactory:
FakeStopwatchFactory
(
stopwatch:
fakeStopwatch
),
machine:
false
,
);
final
Status
status
=
logger
.
startProgress
(
'Hello'
,
...
...
@@ -1101,7 +1008,6 @@ void main() {
),
stdio:
fakeStdio
,
outputPreferences:
OutputPreferences
.
test
(
showColor:
false
),
machine:
false
,
);
logger
.
startProgress
(
'AAA'
).
stop
();
logger
.
startProgress
(
'BBB'
).
stop
();
...
...
@@ -1125,7 +1031,6 @@ void main() {
),
stdio:
fakeStdio
,
outputPreferences:
OutputPreferences
.
test
(),
machine:
false
,
),
stopwatchFactory:
FakeStopwatchFactory
(),
);
...
...
packages/flutter_tools/test/general.shard/base/terminal_test.dart
View file @
63a40131
...
...
@@ -16,7 +16,6 @@ void main() {
final
BufferLogger
bufferLogger
=
BufferLogger
(
outputPreferences:
OutputPreferences
.
test
(
wrapText:
true
,
wrapColumn:
40
),
terminal:
TestTerminal
(
platform:
FakePlatform
()..
stdoutSupportsAnsi
=
true
),
machine:
false
,
);
bufferLogger
.
printStatus
(
'0123456789'
*
8
);
...
...
@@ -27,7 +26,6 @@ void main() {
final
BufferLogger
bufferLogger
=
BufferLogger
(
outputPreferences:
OutputPreferences
.
test
(
wrapText:
false
),
terminal:
TestTerminal
(
platform:
FakePlatform
()..
stdoutSupportsAnsi
=
true
),
machine:
false
,
);
final
String
testString
=
'0123456789'
*
20
;
bufferLogger
.
printStatus
(
testString
);
...
...
@@ -126,7 +124,6 @@ void main() {
final
BufferLogger
bufferLogger
=
BufferLogger
(
terminal:
terminalUnderTest
,
outputPreferences:
OutputPreferences
.
test
(),
machine:
false
,
);
terminalUnderTest
.
usesTerminalUi
=
true
;
mockStdInStream
=
Stream
<
String
>.
fromFutures
(<
Future
<
String
>>[
...
...
@@ -151,7 +148,6 @@ void main() {
final
BufferLogger
bufferLogger
=
BufferLogger
(
terminal:
terminalUnderTest
,
outputPreferences:
OutputPreferences
.
test
(),
machine:
false
,
);
terminalUnderTest
.
usesTerminalUi
=
true
;
mockStdInStream
=
Stream
<
String
>.
fromFutures
(<
Future
<
String
>>[
...
...
packages/flutter_tools/test/general.shard/migrations/cmake_project_migration_test.dart
View file @
63a40131
...
...
@@ -40,7 +40,6 @@ void main () {
testLogger
=
BufferLogger
(
terminal:
Terminal
.
test
(),
outputPreferences:
OutputPreferences
.
test
(),
machine:
false
,
);
mockCmakeProject
=
FakeCmakeProject
(
managedCmakeFile
);
...
...
packages/flutter_tools/test/integration.shard/downgrade_upgrade_integration_test.dart
View file @
63a40131
...
...
@@ -24,7 +24,6 @@ final ProcessUtils processUtils = ProcessUtils(processManager: processManager, l
),
stdio:
stdio
,
outputPreferences:
OutputPreferences
.
test
(
wrapText:
true
),
machine:
false
,
));
final
String
flutterBin
=
fileSystem
.
path
.
join
(
getFlutterRoot
(),
'bin'
,
platform
.
isWindows
?
'flutter.bat'
:
'flutter'
);
...
...
packages/flutter_tools/test/src/testbed.dart
View file @
63a40131
...
...
@@ -38,7 +38,6 @@ final Map<Type, Generator> _testbedDefaults = <Type, Generator>{
Logger:
()
=>
BufferLogger
(
terminal:
AnsiTerminal
(
stdio:
globals
.
stdio
,
platform:
globals
.
platform
),
// Danger, using real stdio.
outputPreferences:
OutputPreferences
.
test
(),
machine:
false
,
),
// Allows reading logs and prevents stdout.
OperatingSystemUtils:
()
=>
FakeOperatingSystemUtils
(),
OutputPreferences:
()
=>
OutputPreferences
.
test
(),
// configures BufferLogger to avoid color codes.
...
...
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