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
97e82d79
Unverified
Commit
97e82d79
authored
Jan 16, 2021
by
Jonah Williams
Committed by
GitHub
Jan 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] verify successful dart migrate (#74079)
parent
45d01c95
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
migrate_test.dart
...es/flutter_tools/test/integration.shard/migrate_test.dart
+50
-0
No files found.
packages/flutter_tools/test/integration.shard/migrate_test.dart
0 → 100644
View file @
97e82d79
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'../src/common.dart'
;
import
'test_utils.dart'
;
/// Verifies that `dart migrate` will run successfuly on the default `flutter create`
/// template.
void
main
(
)
{
testWithoutContext
(
'dart migrate succeedes on flutter create template'
,
()
async
{
final
String
flutterBin
=
fileSystem
.
path
.
join
(
getFlutterRoot
(),
'bin'
,
platform
.
isWindows
?
'flutter.bat'
:
'flutter'
);
final
String
dartBin
=
fileSystem
.
path
.
join
(
getFlutterRoot
(),
'bin'
,
platform
.
isWindows
?
'dart.bat'
:
'dart'
);
Directory
tempDir
;
try
{
tempDir
=
createResolvedTempDirectorySync
(
'dart_migrate_test.'
);
final
ProcessResult
createResult
=
await
processManager
.
run
(<
String
>[
flutterBin
,
'create'
,
'foo'
,
],
workingDirectory:
tempDir
.
path
);
if
(
createResult
.
exitCode
!=
0
)
{
fail
(
'flutter create did not work:
${createResult.stdout}${createResult.stderr}
'
);
}
final
ProcessResult
migrateResult
=
await
processManager
.
run
(<
String
>[
dartBin
,
'migrate'
,
'--apply-changes'
,
],
workingDirectory:
fileSystem
.
path
.
join
(
tempDir
.
path
,
'foo'
));
if
(
migrateResult
.
exitCode
!=
0
)
{
fail
(
'dart migrate did not work:
${migrateResult.stdout}${migrateResult.stderr}
'
);
}
final
ProcessResult
analyzeResult
=
await
processManager
.
run
(<
String
>[
flutterBin
,
'analyze'
,
],
workingDirectory:
fileSystem
.
path
.
join
(
tempDir
.
path
,
'foo'
));
if
(
analyzeResult
.
exitCode
!=
0
)
{
fail
(
'flutter analyze had errors:
${analyzeResult.stdout}${analyzeResult.stderr}
'
);
}
}
finally
{
tempDir
?.
deleteSync
(
recursive:
true
);
}
});
}
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