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
a5b198e9
Commit
a5b198e9
authored
May 09, 2016
by
Devon Carew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove the --checked option (#3799)
parent
40152c55
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
16 deletions
+19
-16
drive.dart
packages/flutter_tools/lib/src/commands/drive.dart
+6
-4
listen.dart
packages/flutter_tools/lib/src/commands/listen.dart
+2
-1
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+7
-7
drive_test.dart
packages/flutter_tools/test/drive_test.dart
+4
-4
No files found.
packages/flutter_tools/lib/src/commands/drive.dart
View file @
a5b198e9
...
...
@@ -13,6 +13,7 @@ import '../application_package.dart';
import
'../base/file_system.dart'
;
import
'../base/common.dart'
;
import
'../base/os.dart'
;
import
'../build_configuration.dart'
;
import
'../device.dart'
;
import
'../globals.dart'
;
import
'../ios/simulators.dart'
show
SimControl
,
IOSSimulatorUtils
;
...
...
@@ -99,7 +100,7 @@ class DriveCommand extends RunCommandBase {
if
(!
argResults
[
'use-existing-app'
])
{
printStatus
(
'Starting application:
${argResults["target"]}
'
);
int
result
=
await
appStarter
(
this
);
int
result
=
await
appStarter
(
this
,
getBuildMode
()
);
if
(
result
!=
0
)
{
printError
(
'Application failed to start. Will not run test. Quitting.'
);
return
result
;
...
...
@@ -228,13 +229,14 @@ Future<Device> findTargetDevice() async {
}
/// Starts the application on the device given command configuration.
typedef
Future
<
int
>
AppStarter
(
DriveCommand
command
);
typedef
Future
<
int
>
AppStarter
(
DriveCommand
command
,
BuildMode
buildMode
);
AppStarter
appStarter
=
startApp
;
void
restoreAppStarter
(
)
{
appStarter
=
startApp
;
}
Future
<
int
>
startApp
(
DriveCommand
command
)
async
{
Future
<
int
>
startApp
(
DriveCommand
command
,
BuildMode
buildMode
)
async
{
String
mainPath
=
findMainDartFile
(
command
.
target
);
if
(
await
fs
.
type
(
mainPath
)
!=
FileSystemEntityType
.
FILE
)
{
printError
(
'Tried to run
$mainPath
, but that file does not exist.'
);
...
...
@@ -269,7 +271,7 @@ Future<int> startApp(DriveCommand command) async {
mainPath:
mainPath
,
route:
command
.
route
,
debuggingOptions:
new
DebuggingOptions
.
enabled
(
checked:
command
.
checked
,
checked:
buildMode
==
BuildMode
.
debug
,
startPaused:
true
,
observatoryPort:
command
.
debugPort
),
...
...
packages/flutter_tools/lib/src/commands/listen.dart
View file @
a5b198e9
...
...
@@ -8,6 +8,7 @@ import 'dart:io';
import
'../base/os.dart'
;
import
'../base/process.dart'
;
import
'../device.dart'
;
import
'../build_configuration.dart'
;
import
'../globals.dart'
;
import
'run.dart'
;
...
...
@@ -63,7 +64,7 @@ class ListenCommand extends RunCommandBase {
target: target,
install: firstTime,
stop: true,
debuggingOptions: new DebuggingOptions.enabled(checked:
checked
),
debuggingOptions: new DebuggingOptions.enabled(checked:
getBuildMode() == BuildMode.debug
),
traceStartup: traceStartup,
route: route
);
...
...
packages/flutter_tools/lib/src/commands/run.dart
View file @
a5b198e9
...
...
@@ -20,10 +20,12 @@ import 'install.dart';
abstract
class
RunCommandBase
extends
FlutterCommand
{
RunCommandBase
()
{
argParser
.
addFlag
(
'checked'
,
negatable:
true
,
defaultsTo:
true
,
help:
'Toggle Dart
\'
s checked mode.'
);
addBuildModeFlags
();
// TODO(devoncarew): This flag is ignored, and should be removed once tools
// no longer pass in `--checked`.
argParser
.
addFlag
(
'checked'
,
negatable:
true
,
hide:
true
);
argParser
.
addFlag
(
'trace-startup'
,
negatable:
true
,
defaultsTo:
false
,
...
...
@@ -33,7 +35,6 @@ abstract class RunCommandBase extends FlutterCommand {
usesTargetOption
();
}
bool
get
checked
=>
argResults
[
'checked'
];
bool
get
traceStartup
=>
argResults
[
'trace-startup'
];
String
get
target
=>
argResults
[
'target'
];
String
get
route
=>
argResults
[
'route'
];
...
...
@@ -50,7 +51,6 @@ class RunCommand extends RunCommandBase {
final
List
<
String
>
aliases
=
<
String
>[
'start'
];
RunCommand
()
{
addBuildModeFlags
();
argParser
.
addFlag
(
'full-restart'
,
defaultsTo:
true
,
help:
'Stop any currently running application process before running the app.'
);
...
...
@@ -105,7 +105,7 @@ class RunCommand extends RunCommandBase {
options
=
new
DebuggingOptions
.
disabled
();
}
else
{
options
=
new
DebuggingOptions
.
enabled
(
checked:
checked
,
checked:
getBuildMode
()
==
BuildMode
.
debug
,
startPaused:
argResults
[
'start-paused'
],
observatoryPort:
debugPort
);
...
...
packages/flutter_tools/test/drive_test.dart
View file @
a5b198e9
...
...
@@ -38,7 +38,7 @@ void main() {
targetDeviceFinder
=
()
{
throw
'Unexpected call to targetDeviceFinder'
;
};
appStarter
=
(
_
)
{
appStarter
=
(
_
,
__
)
{
throw
'Unexpected call to appStarter'
;
};
testRunner
=
(
_
)
{
...
...
@@ -75,7 +75,7 @@ void main() {
testUsingContext
(
'returns 1 when app fails to run'
,
()
async
{
withMockDevice
();
appStarter
=
expectAsync
((
_
)
async
=>
1
);
appStarter
=
expectAsync
((
_
,
__
)
async
=>
1
);
String
testApp
=
'/some/app/test_driver/e2e.dart'
;
String
testFile
=
'/some/app/test_driver/e2e_test.dart'
;
...
...
@@ -140,7 +140,7 @@ void main() {
String
testApp
=
'/some/app/test/e2e.dart'
;
String
testFile
=
'/some/app/test_driver/e2e_test.dart'
;
appStarter
=
expectAsync
((
_
)
{
appStarter
=
expectAsync
((
_
,
__
)
{
return
new
Future
<
int
>.
value
(
0
);
});
testRunner
=
expectAsync
((
List
<
String
>
testArgs
)
{
...
...
@@ -172,7 +172,7 @@ void main() {
String
testApp
=
'/some/app/test/e2e.dart'
;
String
testFile
=
'/some/app/test_driver/e2e_test.dart'
;
appStarter
=
expectAsync
((
_
)
{
appStarter
=
expectAsync
((
_
,
__
)
{
return
new
Future
<
int
>.
value
(
0
);
});
testRunner
=
expectAsync
((
_
)
{
...
...
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