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
749589d8
Unverified
Commit
749589d8
authored
Jan 10, 2020
by
Jonah Williams
Committed by
GitHub
Jan 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] Remove context usage from status and clean up test cases (#48446)
parent
5f4e4a3f
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
238 additions
and
121 deletions
+238
-121
logger.dart
packages/flutter_tools/lib/src/base/logger.dart
+88
-20
daemon.dart
packages/flutter_tools/lib/src/commands/daemon.dart
+6
-2
context_runner.dart
packages/flutter_tools/lib/src/context_runner.dart
+2
-0
doctor.dart
packages/flutter_tools/lib/src/doctor.dart
+3
-0
xcodeproj.dart
packages/flutter_tools/lib/src/ios/xcodeproj.dart
+3
-0
flutter_command_runner.dart
.../flutter_tools/lib/src/runner/flutter_command_runner.dart
+1
-1
attach_test.dart
...utter_tools/test/commands.shard/hermetic/attach_test.dart
+5
-1
logger_test.dart
...es/flutter_tools/test/general.shard/base/logger_test.dart
+126
-97
vmservice_test.dart
...ages/flutter_tools/test/general.shard/vmservice_test.dart
+4
-0
No files found.
packages/flutter_tools/lib/src/base/logger.dart
View file @
749589d8
This diff is collapsed.
Click to expand it.
packages/flutter_tools/lib/src/commands/daemon.dart
View file @
749589d8
...
...
@@ -974,7 +974,11 @@ class NotifyingLogger extends Logger {
})
{
assert
(
timeout
!=
null
);
printStatus
(
message
);
return
SilentStatus
(
timeout:
timeout
,
timeoutConfiguration:
timeoutConfiguration
);
return
SilentStatus
(
timeout:
timeout
,
timeoutConfiguration:
timeoutConfiguration
,
stopwatch:
Stopwatch
(),
);
}
void
dispose
()
{
...
...
@@ -1181,7 +1185,7 @@ class _AppRunLogger extends Logger {
'progressId'
:
progressId
,
'finished'
:
true
,
});
})..
start
();
}
,
stopwatch:
Stopwatch
()
)..
start
();
return
_status
;
}
...
...
packages/flutter_tools/lib/src/context_runner.dart
View file @
749589d8
...
...
@@ -108,12 +108,14 @@ Future<T> runInContext<T>(
stdio:
globals
.
stdio
,
outputPreferences:
outputPreferences
,
timeoutConfiguration:
timeoutConfiguration
,
platform:
globals
.
platform
,
)
:
StdoutLogger
(
terminal:
globals
.
terminal
,
stdio:
globals
.
stdio
,
outputPreferences:
outputPreferences
,
timeoutConfiguration:
timeoutConfiguration
,
platform:
globals
.
platform
,
),
MacOSWorkflow:
()
=>
const
MacOSWorkflow
(),
MDnsObservatoryDiscovery:
()
=>
MDnsObservatoryDiscovery
(),
...
...
packages/flutter_tools/lib/src/doctor.dart
View file @
749589d8
...
...
@@ -259,6 +259,9 @@ class Doctor {
timeout:
timeoutConfiguration
.
fastOperation
,
slowWarningCallback:
()
=>
validator
.
slowWarning
,
timeoutConfiguration:
timeoutConfiguration
,
stopwatch:
Stopwatch
(),
supportsColor:
globals
.
terminal
.
supportsColor
,
platform:
globals
.
platform
,
);
ValidationResult
result
;
try
{
...
...
packages/flutter_tools/lib/src/ios/xcodeproj.dart
View file @
749589d8
...
...
@@ -285,6 +285,9 @@ class XcodeProjectInterpreter {
final
Status
status
=
Status
.
withSpinner
(
timeout:
timeoutConfiguration
.
fastOperation
,
timeoutConfiguration:
timeoutConfiguration
,
platform:
globals
.
platform
,
stopwatch:
Stopwatch
(),
supportsColor:
globals
.
terminal
.
supportsColor
,
);
final
List
<
String
>
showBuildSettingsCommand
=
<
String
>[
_executable
,
...
...
packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
View file @
749589d8
...
...
@@ -239,7 +239,7 @@ class FlutterCommandRunner extends CommandRunner<void> {
// Check for verbose.
if
(
topLevelResults
[
'verbose'
]
as
bool
)
{
// Override the logger.
contextOverrides
[
Logger
]
=
VerboseLogger
(
globals
.
logger
,
stopwatch:
Stopwatch
()
);
contextOverrides
[
Logger
]
=
VerboseLogger
(
globals
.
logger
);
}
// Don't set wrapColumns unless the user said to: if it's set, then all
...
...
packages/flutter_tools/test/commands.shard/hermetic/attach_test.dart
View file @
749589d8
...
...
@@ -704,7 +704,11 @@ class StreamLogger extends Logger {
int
progressIndicatorPadding
=
kDefaultStatusPadding
,
})
{
_log
(
'[progress]
$message
'
);
return
SilentStatus
(
timeout:
timeout
,
timeoutConfiguration:
timeoutConfiguration
)..
start
();
return
SilentStatus
(
timeout:
timeout
,
timeoutConfiguration:
timeoutConfiguration
,
stopwatch:
Stopwatch
(),
)..
start
();
}
bool
_interrupt
=
false
;
...
...
packages/flutter_tools/test/general.shard/base/logger_test.dart
View file @
749589d8
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/general.shard/vmservice_test.dart
View file @
749589d8
...
...
@@ -196,6 +196,7 @@ void main() {
stdio:
mockStdio
,
terminal:
AnsiTerminal
(
stdio:
mockStdio
,
platform:
const
LocalPlatform
()),
timeoutConfiguration:
const
TimeoutConfiguration
(),
platform:
FakePlatform
(),
),
WebSocketConnector:
()
=>
(
String
url
,
{
CompressionOptions
compression
})
async
=>
throw
const
SocketException
(
'test'
),
});
...
...
@@ -275,6 +276,7 @@ void main() {
terminal:
AnsiTerminal
(
stdio:
mockStdio
,
platform:
const
LocalPlatform
()),
stdio:
mockStdio
,
timeoutConfiguration:
const
TimeoutConfiguration
(),
platform:
FakePlatform
(),
),
});
...
...
@@ -292,6 +294,7 @@ void main() {
terminal:
AnsiTerminal
(
stdio:
mockStdio
,
platform:
const
LocalPlatform
()),
stdio:
mockStdio
,
timeoutConfiguration:
const
TimeoutConfiguration
(),
platform:
FakePlatform
(),
),
});
...
...
@@ -310,6 +313,7 @@ void main() {
terminal:
AnsiTerminal
(
stdio:
mockStdio
,
platform:
const
LocalPlatform
()),
stdio:
mockStdio
,
timeoutConfiguration:
const
TimeoutConfiguration
(),
platform:
FakePlatform
(),
),
});
});
...
...
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