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
7f235ea8
Unverified
Commit
7f235ea8
authored
Dec 06, 2019
by
Jonah Williams
Committed by
GitHub
Dec 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mitigation for current tool test skips on CI (#46181)
parent
ad20d368
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
22 deletions
+46
-22
test.dart
dev/bots/test.dart
+9
-2
create_test.dart
...tter_tools/test/commands.shard/permeable/create_test.dart
+14
-4
test_test.dart
...lutter_tools/test/commands.shard/permeable/test_test.dart
+5
-2
upgrade_test.dart
...ter_tools/test/commands.shard/permeable/upgrade_test.dart
+16
-12
fake_process_manager.dart
packages/flutter_tools/test/src/fake_process_manager.dart
+2
-2
No files found.
dev/bots/test.dart
View file @
7f235ea8
...
...
@@ -36,7 +36,9 @@ final String toolRoot = path.join(flutterRoot, 'packages', 'flutter_tools');
final
List
<
String
>
flutterTestArgs
=
<
String
>[];
final
bool
useFlutterTestFormatter
=
Platform
.
environment
[
'FLUTTER_TEST_FORMATTER'
]
==
'true'
;
final
bool
canUseBuildRunner
=
Platform
.
environment
[
'FLUTTER_TEST_NO_BUILD_RUNNER'
]
!=
'true'
;
// This is disabled due to https://github.com/dart-lang/build/issues/2562
const
bool
canUseBuildRunner
=
false
;
/// The number of Cirrus jobs that run host-only devicelab tests in parallel.
///
...
...
@@ -260,9 +262,14 @@ Future<void> _runToolTests() async {
.
map
<
String
>((
String
name
)
=>
path
.
basenameWithoutExtension
(
name
)),
// The `dynamic` on the next line is because Map.fromIterable isn't generic.
value:
(
dynamic
subshard
)
=>
()
async
{
// Due to https://github.com/flutter/flutter/issues/46180, skip the hermetic directory
// on Windows.
final
String
suffix
=
Platform
.
isWindows
&&
subshard
==
'commands'
?
'permeable'
:
''
;
await
_pubRunTest
(
toolsPath
,
testPath:
path
.
join
(
kTest
,
'
$subshard$kDotShard
'
),
testPath:
path
.
join
(
kTest
,
'
$subshard$kDotShard
'
,
suffix
),
useBuildRunner:
canUseBuildRunner
,
tableData:
bigqueryApi
?.
tabledata
,
enableFlutterToolAsserts:
true
,
...
...
packages/flutter_tools/test/commands.shard/permeable/create_test.dart
View file @
7f235ea8
...
...
@@ -15,6 +15,7 @@ import 'package:flutter_tools/src/cache.dart';
import
'package:flutter_tools/src/commands/create.dart'
;
import
'package:flutter_tools/src/dart/pub.dart'
;
import
'package:flutter_tools/src/dart/sdk.dart'
;
import
'package:flutter_tools/src/features.dart'
;
import
'package:flutter_tools/src/project.dart'
;
import
'package:flutter_tools/src/version.dart'
;
...
...
@@ -23,6 +24,7 @@ import 'package:process/process.dart';
import
'../../src/common.dart'
;
import
'../../src/context.dart'
;
import
'../../src/testbed.dart'
;
const
String
frameworkRevision
=
'12345678'
;
const
String
frameworkChannel
=
'omega'
;
...
...
@@ -404,7 +406,7 @@ void main() {
);
},
overrides:
<
Type
,
Generator
>{
Pub:
()
=>
const
Pub
(),
}
);
}
,
skip:
true
);
// https://github.com/flutter/flutter/issues/46142
testUsingContext
(
'module project with pub'
,
()
async
{
return
_createProject
(
projectDir
,
<
String
>[
...
...
@@ -439,7 +441,7 @@ void main() {
]);
},
overrides:
<
Type
,
Generator
>{
Pub:
()
=>
const
Pub
(),
}
);
}
,
skip:
true
);
// https://github.com/flutter/flutter/issues/46142
testUsingContext
(
'androidx is used by default in an app project'
,
()
async
{
...
...
@@ -568,9 +570,11 @@ void main() {
final
CreateCommand
command
=
CreateCommand
();
final
CommandRunner
<
void
>
runner
=
createTestCommandRunner
(
command
);
await
runner
.
run
(<
String
>[
'create'
,
'--no-pub'
,
'--macos'
,
projectDir
.
path
]);
await
runner
.
run
(<
String
>[
'create'
,
'--no-pub'
,
projectDir
.
path
]);
expect
(
projectDir
.
childDirectory
(
'macos'
).
childDirectory
(
'Runner.xcworkspace'
).
existsSync
(),
true
);
},
overrides:
<
Type
,
Generator
>{
FeatureFlags:
()
=>
TestFeatureFlags
(
isMacOSEnabled:
true
),
});
testUsingContext
(
'app does not include macOS by default'
,
()
async
{
...
...
@@ -584,6 +588,8 @@ void main() {
await
runner
.
run
(<
String
>[
'create'
,
'--no-pub'
,
projectDir
.
path
]);
expect
(
projectDir
.
childDirectory
(
'macos'
).
childDirectory
(
'Runner.xcworkspace'
).
existsSync
(),
false
);
},
overrides:
<
Type
,
Generator
>{
FeatureFlags:
()
=>
TestFeatureFlags
(
isMacOSEnabled:
false
),
});
testUsingContext
(
'plugin supports macOS if requested'
,
()
async
{
...
...
@@ -594,9 +600,11 @@ void main() {
final
CreateCommand
command
=
CreateCommand
();
final
CommandRunner
<
void
>
runner
=
createTestCommandRunner
(
command
);
await
runner
.
run
(<
String
>[
'create'
,
'--no-pub'
,
'--template=plugin'
,
'--macos'
,
projectDir
.
path
]);
await
runner
.
run
(<
String
>[
'create'
,
'--no-pub'
,
'--template=plugin'
,
projectDir
.
path
]);
expect
(
projectDir
.
childDirectory
(
'macos'
).
childFile
(
'flutter_project.podspec'
).
existsSync
(),
true
);
},
overrides:
<
Type
,
Generator
>{
FeatureFlags:
()
=>
TestFeatureFlags
(
isMacOSEnabled:
true
),
});
testUsingContext
(
'plugin does not include macOS by default'
,
()
async
{
...
...
@@ -610,6 +618,8 @@ void main() {
await
runner
.
run
(<
String
>[
'create'
,
'--no-pub'
,
'--template=plugin'
,
projectDir
.
path
]);
expect
(
projectDir
.
childDirectory
(
'macos'
).
childFile
(
'flutter_project.podspec'
).
existsSync
(),
false
);
},
overrides:
<
Type
,
Generator
>{
FeatureFlags:
()
=>
TestFeatureFlags
(
isMacOSEnabled:
false
),
});
testUsingContext
(
'has correct content and formatting with module template'
,
()
async
{
...
...
packages/flutter_tools/test/commands.shard/permeable/test_test.dart
View file @
7f235ea8
...
...
@@ -31,7 +31,9 @@ void main() {
testUsingContext
(
'report nice errors for exceptions thrown within testWidgets()'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
return
_testFile
(
'exception_handling'
,
automatedTestsDirectory
,
flutterTestDirectory
);
},
skip:
io
.
Platform
.
isWindows
);
// TODO(chunhtai): Remove Skip https://github.com/flutter/flutter/issues/35425.
},
skip:
true
);
// https://github.com/flutter/flutter/issues/46142
// Note: was skip: skip: io.Platform.isWindows
// TODO(chunhtai): Remove Skip https://github.com/flutter/flutter/issues/35425.
testUsingContext
(
'report a nice error when a guarded function was called without await'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
...
...
@@ -75,7 +77,8 @@ void main() {
testUsingContext
(
'can load assets within its own package'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
return
_testFile
(
'package_assets'
,
automatedTestsDirectory
,
flutterTestDirectory
,
exitCode:
isZero
);
},
skip:
io
.
Platform
.
isWindows
);
},
skip:
true
);
// https://github.com/flutter/flutter/issues/46142
// Note, was skip: io.Platform.isWindows
testUsingContext
(
'run a test when its name matches a regexp'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
...
...
packages/flutter_tools/test/commands.shard/permeable/upgrade_test.dart
View file @
7f235ea8
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter_tools/runner.dart'
as
runner
;
import
'package:flutter_tools/src/base/common.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
...
...
@@ -10,6 +9,7 @@ import 'package:flutter_tools/src/base/platform.dart';
import
'package:flutter_tools/src/base/os.dart'
;
import
'package:flutter_tools/src/cache.dart'
;
import
'package:flutter_tools/src/commands/upgrade.dart'
;
import
'package:flutter_tools/src/convert.dart'
;
import
'package:flutter_tools/src/persistent_tool_state.dart'
;
import
'package:flutter_tools/src/runner/flutter_command.dart'
;
import
'package:flutter_tools/src/version.dart'
;
...
...
@@ -214,12 +214,7 @@ void main() {
});
group
(
'full command'
,
()
{
final
FakeProcessManager
fakeProcessManager
=
FakeProcessManager
.
list
(<
FakeCommand
>[
const
FakeCommand
(
command:
<
String
>[
'git'
,
'describe'
,
'--match'
,
'v*.*.*'
,
'--first-parent'
,
'--long'
,
'--tags'
,
]),
]);
FakeProcessManager
fakeProcessManager
;
Directory
tempDir
;
File
flutterToolState
;
...
...
@@ -227,6 +222,14 @@ void main() {
setUp
(()
{
Cache
.
disableLocking
();
fakeProcessManager
=
FakeProcessManager
.
list
(<
FakeCommand
>[
const
FakeCommand
(
command:
<
String
>[
'git'
,
'describe'
,
'--match'
,
'v*.*.*'
,
'--first-parent'
,
'--long'
,
'--tags'
,
],
stdout:
'v1.12.16-19-gb45b676af'
,
),
]);
tempDir
=
fs
.
systemTempDirectory
.
createTempSync
(
'flutter_upgrade_test.'
);
flutterToolState
=
tempDir
.
childFile
(
'.flutter_tool_state'
);
mockFlutterVersion
=
MockFlutterVersion
(
isStable:
true
);
...
...
@@ -239,16 +242,17 @@ void main() {
testUsingContext
(
'upgrade continue prints welcome message'
,
()
async
{
final
UpgradeCommand
upgradeCommand
=
UpgradeCommand
(
fakeCommandRunner
);
await
runner
.
run
(
applyMocksToCommand
(
upgradeCommand
);
await
createTestCommandRunner
(
upgradeCommand
).
run
(
<
String
>[
'upgrade'
,
'--continue'
,
],
<
FlutterCommand
>[
upgradeCommand
,
],
);
expect
(
testLogger
.
statusText
,
contains
(
'Welcome to Flutter!'
));
expect
(
json
.
decode
(
flutterToolState
.
readAsStringSync
()),
containsPair
(
'redisplay-welcome-message'
,
true
));
},
overrides:
<
Type
,
Generator
>{
FlutterVersion:
()
=>
mockFlutterVersion
,
ProcessManager:
()
=>
fakeProcessManager
,
...
...
packages/flutter_tools/test/src/fake_process_manager.dart
View file @
7f235ea8
...
...
@@ -198,9 +198,9 @@ abstract class FakeProcessManager implements ProcessManager {
fakeCommand
.
duration
,
fakeCommand
.
onRun
,
_pid
,
fakeCommand
.
stdout
,
null
,
// stdin
fakeCommand
.
stderr
,
null
,
// stdin
fakeCommand
.
stdout
,
);
}
...
...
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