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
089ce483
Commit
089ce483
authored
Mar 04, 2016
by
Devon Carew
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2427 from devoncarew/fix_mac_test
fix a mac test
parents
e2a6b488
c1caa269
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
31 deletions
+28
-31
create.dart
packages/flutter_tools/lib/src/commands/create.dart
+5
-2
create_test.dart
packages/flutter_tools/test/create_test.dart
+23
-29
No files found.
packages/flutter_tools/lib/src/commands/create.dart
View file @
089ce483
...
...
@@ -128,7 +128,10 @@ All done! In order to run your application, type:
void
_renderTemplates
(
String
projectName
,
String
dirPath
,
String
flutterPackagesDirectory
,
{
bool
renderDriverTest:
false
})
{
String
relativeFlutterPackagesDirectory
=
path
.
relative
(
flutterPackagesDirectory
,
from:
dirPath
);
String
relativePackagesDirectory
=
path
.
relative
(
flutterPackagesDirectory
,
from:
path
.
join
(
dirPath
,
'pubspec.yaml'
)
);
printStatus
(
'Creating project
${path.basename(projectName)}
:'
);
...
...
@@ -139,7 +142,7 @@ All done! In order to run your application, type:
'androidIdentifier'
:
_createAndroidIdentifier
(
projectName
),
'iosIdentifier'
:
_createUTIIdentifier
(
projectName
),
'description'
:
description
,
'flutterPackagesDirectory'
:
relative
Flutter
PackagesDirectory
,
'flutterPackagesDirectory'
:
relativePackagesDirectory
,
'androidMinApiLevel'
:
android
.
minApiLevel
};
...
...
packages/flutter_tools/test/create_test.dart
View file @
089ce483
...
...
@@ -27,34 +27,28 @@ defineTests() {
temp
.
deleteSync
(
recursive:
true
);
});
// This test consistently times out on our windows bot. The code is already
// covered on the linux one.
// Also fails on mac, with create --out returning '69'
// TODO(devoncarew): https://github.com/flutter/flutter/issues/1709
if
(
Platform
.
isLinux
)
{
// Verify that we create a project that is well-formed.
testUsingContext
(
'flutter-simple'
,
()
async
{
ArtifactStore
.
flutterRoot
=
'../..'
;
CreateCommand
command
=
new
CreateCommand
();
CommandRunner
runner
=
new
CommandRunner
(
'test_flutter'
,
''
)
..
addCommand
(
command
);
await
runner
.
run
([
'create'
,
'--out'
,
temp
.
path
])
.
then
((
int
code
)
=>
expect
(
code
,
equals
(
0
)));
String
mainPath
=
path
.
join
(
temp
.
path
,
'lib'
,
'main.dart'
);
expect
(
new
File
(
mainPath
).
existsSync
(),
true
);
ProcessResult
exec
=
Process
.
runSync
(
sdkBinaryName
(
'dartanalyzer'
),
[
'--fatal-warnings'
,
mainPath
],
workingDirectory:
temp
.
path
);
if
(
exec
.
exitCode
!=
0
)
{
print
(
exec
.
stdout
);
print
(
exec
.
stderr
);
}
expect
(
exec
.
exitCode
,
0
);
},
// This test can take a while due to network requests.
timeout:
new
Timeout
(
new
Duration
(
minutes:
2
)));
}
// Verify that we create a project that is well-formed.
testUsingContext
(
'flutter-simple'
,
()
async
{
ArtifactStore
.
flutterRoot
=
'../..'
;
CreateCommand
command
=
new
CreateCommand
();
CommandRunner
runner
=
new
CommandRunner
(
'test_flutter'
,
''
)
..
addCommand
(
command
);
await
runner
.
run
([
'create'
,
'--out'
,
temp
.
path
])
.
then
((
int
code
)
=>
expect
(
code
,
equals
(
0
)));
String
mainPath
=
path
.
join
(
temp
.
path
,
'lib'
,
'main.dart'
);
expect
(
new
File
(
mainPath
).
existsSync
(),
true
);
ProcessResult
exec
=
Process
.
runSync
(
sdkBinaryName
(
'dartanalyzer'
),
[
'--fatal-warnings'
,
mainPath
],
workingDirectory:
temp
.
path
);
if
(
exec
.
exitCode
!=
0
)
{
print
(
exec
.
stdout
);
print
(
exec
.
stderr
);
}
expect
(
exec
.
exitCode
,
0
);
},
// This test can take a while due to network requests.
timeout:
new
Timeout
(
new
Duration
(
minutes:
2
)));
});
}
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