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
b035ef13
Unverified
Commit
b035ef13
authored
Jul 26, 2022
by
Christopher Fujino
Committed by
GitHub
Jul 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] Remove more shuffles (#107759)
parent
4056d3ff
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
53 deletions
+56
-53
build_bundle_test.dart
...ools/test/commands.shard/permeable/build_bundle_test.dart
+36
-36
dart_plugin_registrant_test.dart
...ard/build_system/targets/dart_plugin_registrant_test.dart
+10
-9
channel_test.dart
packages/flutter_tools/test/general.shard/channel_test.dart
+9
-6
context.dart
packages/flutter_tools/test/src/context.dart
+1
-2
No files found.
packages/flutter_tools/test/commands.shard/permeable/build_bundle_test.dart
View file @
b035ef13
This diff is collapsed.
Click to expand it.
packages/flutter_tools/test/general.shard/build_system/targets/dart_plugin_registrant_test.dart
View file @
b035ef13
...
...
@@ -2,12 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(gspencergoog): Remove this tag once this test's state leaks/test
// dependencies have been fixed.
// https://github.com/flutter/flutter/issues/85160
// Fails with "flutter test --test-randomize-ordering-seed=20210722"
@Tags
(<
String
>[
'no-shuffle'
])
import
'package:file/memory.dart'
;
import
'package:flutter_tools/src/artifacts.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
...
...
@@ -99,7 +93,11 @@ environment:
void
main
(
)
{
group
(
'Dart plugin registrant'
,
()
{
final
FileSystem
fileSystem
=
MemoryFileSystem
.
test
();
late
FileSystem
fileSystem
;
setUp
(()
{
fileSystem
=
MemoryFileSystem
.
test
();
});
testWithoutContext
(
'skipped based on environment.generateDartPluginRegistry'
,
()
async
{
...
...
@@ -123,6 +121,7 @@ void main() {
expect
(
const
DartPluginRegistrantTarget
().
canSkip
(
environment2
),
isFalse
);
});
testWithoutContext
(
'skipped based on platform'
,
()
async
{
const
Map
<
String
,
bool
>
canSkip
=
<
String
,
bool
>{
'darwin-x64'
:
false
,
...
...
@@ -334,7 +333,8 @@ void main() {
projectDir
.
childDirectory
(
'.dart_tool'
)
.
childFile
(
'package_config.json'
)
.
writeAsStringSync
(
_kSamplePackageJson
);
..
createSync
(
recursive:
true
)
..
writeAsStringSync
(
_kSamplePackageJson
);
projectDir
.
childFile
(
'pubspec.yaml'
).
writeAsStringSync
(
_kSamplePubspecFile
);
...
...
@@ -345,7 +345,8 @@ void main() {
environment
.
fileSystem
.
currentDirectory
.
childDirectory
(
'path_provider_linux'
)
.
childFile
(
'pubspec.yaml'
)
.
writeAsStringSync
(
_kSamplePluginPubspec
);
..
createSync
(
recursive:
true
)
..
writeAsStringSync
(
_kSamplePluginPubspec
);
final
FlutterProject
testProject
=
FlutterProject
.
fromDirectoryTest
(
projectDir
);
await
DartPluginRegistrantTarget
.
test
(
testProject
).
build
(
environment
);
...
...
packages/flutter_tools/test/general.shard/channel_test.dart
View file @
b035ef13
...
...
@@ -2,12 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(gspencergoog): Remove this tag once this test's state leaks/test
// dependencies have been fixed.
// https://github.com/flutter/flutter/issues/85160
// Fails with "flutter test --test-randomize-ordering-seed=20210723"
@Tags
(<
String
>[
'no-shuffle'
])
import
'package:args/command_runner.dart'
;
import
'package:file/memory.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
...
...
@@ -33,6 +27,9 @@ void main() {
});
Future
<
void
>
simpleChannelTest
(
List
<
String
>
args
)
async
{
fakeProcessManager
.
addCommands
(
const
<
FakeCommand
>[
FakeCommand
(
command:
<
String
>[
'git'
,
'branch'
,
'-r'
],
stdout:
' branch-1
\n
branch-2'
),
]);
final
ChannelCommand
command
=
ChannelCommand
();
final
CommandRunner
<
void
>
runner
=
createTestCommandRunner
(
command
);
await
runner
.
run
(
args
);
...
...
@@ -48,10 +45,16 @@ void main() {
testUsingContext
(
'list'
,
()
async
{
await
simpleChannelTest
(<
String
>[
'channel'
]);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
fakeProcessManager
,
FileSystem:
()
=>
MemoryFileSystem
.
test
(),
});
testUsingContext
(
'verbose list'
,
()
async
{
await
simpleChannelTest
(<
String
>[
'channel'
,
'-v'
]);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
fakeProcessManager
,
FileSystem:
()
=>
MemoryFileSystem
.
test
(),
});
testUsingContext
(
'sorted by stability'
,
()
async
{
...
...
packages/flutter_tools/test/src/context.dart
View file @
b035ef13
...
...
@@ -122,7 +122,6 @@ void testUsingContext(
TemplateRenderer:
()
=>
const
MustacheTemplateRenderer
(),
},
body:
()
{
final
String
flutterRoot
=
getFlutterRoot
();
return
runZonedGuarded
<
Future
<
dynamic
>>(()
{
try
{
return
context
.
run
<
dynamic
>(
...
...
@@ -134,7 +133,7 @@ void testUsingContext(
if
(
initializeFlutterRoot
)
{
// Provide a sane default for the flutterRoot directory. Individual
// tests can override this either in the test or during setup.
Cache
.
flutterRoot
??=
flutterRoot
;
Cache
.
flutterRoot
??=
getFlutterRoot
()
;
}
return
await
testMethod
();
},
...
...
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