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
a0fc3f31
Unverified
Commit
a0fc3f31
authored
Jun 20, 2019
by
Dan Field
Committed by
GitHub
Jun 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shard framework tests (#34812)
parent
25a3121d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
143 additions
and
32 deletions
+143
-32
.cirrus.yml
.cirrus.yml
+49
-4
test.dart
dev/bots/test.dart
+94
-28
No files found.
.cirrus.yml
View file @
a0fc3f31
...
...
@@ -58,10 +58,31 @@ task:
-
name
:
analyze
test_script
:
-
dart --enable-asserts ./dev/bots/analyze.dart
-
name
:
tests-linux
-
name
:
tests
_widgets
-linux
env
:
GCLOUD_SERVICE_ACCOUNT_KEY
:
ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD
:
tests
SUBSHARD
:
widgets
test_script
:
-
dart --enable-asserts ./dev/bots/test.dart
container
:
cpu
:
4
memory
:
12G
-
name
:
tests_framework_other-linux
env
:
GCLOUD_SERVICE_ACCOUNT_KEY
:
ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD
:
tests
SUBSHARD
:
framework_other
test_script
:
-
dart --enable-asserts ./dev/bots/test.dart
container
:
cpu
:
4
memory
:
12G
-
name
:
tests_extras-linux
env
:
GCLOUD_SERVICE_ACCOUNT_KEY
:
ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD
:
tests
SUBSHARD
:
extras
test_script
:
-
dart --enable-asserts ./dev/bots/test.dart
container
:
...
...
@@ -152,10 +173,21 @@ task:
test_all_script
:
-
bin\cache\dart-sdk\bin\dart.exe --enable-asserts dev\bots\test.dart
matrix
:
-
name
:
tests-windows
-
name
:
tests_widgets-windows
env
:
GCLOUD_SERVICE_ACCOUNT_KEY
:
ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD
:
tests
SUBSHARD
:
widgets
-
name
:
tests_framework_other-windows
env
:
GCLOUD_SERVICE_ACCOUNT_KEY
:
ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD
:
tests
SUBSHARD
:
framework_other
-
name
:
tests_extras-windows
env
:
GCLOUD_SERVICE_ACCOUNT_KEY
:
ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD
:
tests
SUBSHARD
:
extras
-
name
:
tool_tests-windows
env
:
GCLOUD_SERVICE_ACCOUNT_KEY
:
ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
...
...
@@ -221,10 +253,21 @@ task:
CIRRUS_WORKING_DIR
:
"
/tmp/flutter
sdk"
COCOAPODS_DISABLE_STATS
:
true
matrix
:
-
name
:
tests-macos
-
name
:
tests_widgets-macos
env
:
GCLOUD_SERVICE_ACCOUNT_KEY
:
ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD
:
tests
SUBSHARD
:
widgets
-
name
:
tests_framework_other-macos
env
:
GCLOUD_SERVICE_ACCOUNT_KEY
:
ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD
:
tests
SUBSHARD
:
framework_other
-
name
:
tests_extras-macos
env
:
GCLOUD_SERVICE_ACCOUNT_KEY
:
ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
SHARD
:
tests
SUBSHARD
:
extras
-
name
:
tool_tests-macos
env
:
GCLOUD_SERVICE_ACCOUNT_KEY
:
ENCRYPTED[f12abe60f5045d619ef4c79b83dd1e0722a0b0b13dbea95fbe334e2db7fffbcd841a5a92da8824848b539a19afe0c9fb]
...
...
@@ -279,7 +322,9 @@ docker_builder:
depends_on
:
-
docs
-
analyze
-
tests-linux
-
tests_widgets-linux
-
tests_framework_other-linux
-
tests_extras-linux
-
tool_tests-linux
-
build_tests-linux
-
integration_tests-linux
...
...
dev/bots/test.dart
View file @
a0fc3f31
...
...
@@ -307,35 +307,97 @@ Future<void> _runAdd2AppTest() async {
Future
<
void
>
_runTests
()
async
{
final
bq
.
BigqueryApi
bigqueryApi
=
await
_getBigqueryApi
();
await
_runSmokeTests
();
final
String
subShard
=
Platform
.
environment
[
'SUBSHARD'
];
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
),
tableData:
bigqueryApi
?.
tabledata
);
// Only packages/flutter/test/widgets/widget_inspector_test.dart really
// needs to be run with --track-widget-creation but it is nice to run
// all of the tests in package:flutter with the flag to ensure that
// the Dart kernel transformer triggered by the flag does not break anything.
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
),
options:
<
String
>[
'--track-widget-creation'
],
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_localizations'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_driver'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_test'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'fuchsia_remote_debug_protocol'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_pubRunTest
(
path
.
join
(
flutterRoot
,
'dev'
,
'bots'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_pubRunTest
(
path
.
join
(
flutterRoot
,
'dev'
,
'devicelab'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_pubRunTest
(
path
.
join
(
flutterRoot
,
'dev'
,
'snippets'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'dev'
,
'integration_tests'
,
'android_semantics_testing'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'dev'
,
'manual_tests'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'dev'
,
'tools'
,
'vitool'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'examples'
,
'hello_world'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'examples'
,
'layers'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'examples'
,
'stocks'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'examples'
,
'flutter_gallery'
),
tableData:
bigqueryApi
?.
tabledata
);
// Regression test to ensure that code outside of package:flutter can run
// with --track-widget-creation.
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'examples'
,
'flutter_gallery'
),
options:
<
String
>[
'--track-widget-creation'
],
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'examples'
,
'catalog'
),
tableData:
bigqueryApi
?.
tabledata
);
// Smoke test for code generation.
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'dev'
,
'integration_tests'
,
'codegen'
),
tableData:
bigqueryApi
?.
tabledata
,
environment:
<
String
,
String
>{
'FLUTTER_EXPERIMENTAL_BUILD'
:
'true'
,
});
Future
<
void
>
runWidgets
()
async
{
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
),
tableData:
bigqueryApi
?.
tabledata
,
tests:
<
String
>[
'test/widgets/'
,
],
);
// Only packages/flutter/test/widgets/widget_inspector_test.dart really
// needs to be run with --track-widget-creation but it is nice to run
// all of the tests in package:flutter with the flag to ensure that
// the Dart kernel transformer triggered by the flag does not break anything.
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
),
options:
<
String
>[
'--track-widget-creation'
],
tableData:
bigqueryApi
?.
tabledata
,
tests:
<
String
>[
'test/widgets/'
,
],
);
}
Future
<
void
>
runFrameworkOthers
()
async
{
final
List
<
String
>
tests
=
Directory
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
,
'test'
))
.
listSync
(
followLinks:
false
,
recursive:
false
)
.
whereType
<
Directory
>()
.
map
((
Directory
dir
)
=>
'test/
${path.basename(dir.path)}
/'
)
.
toList
();
print
(
'Running tests for:
${tests.join(';')}
'
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
),
tableData:
bigqueryApi
?.
tabledata
,
tests:
tests
,
);
// Only packages/flutter/test/widgets/widget_inspector_test.dart really
// needs to be run with --track-widget-creation but it is nice to run
// all of the tests in package:flutter with the flag to ensure that
// the Dart kernel transformer triggered by the flag does not break anything.
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter'
),
options:
<
String
>[
'--track-widget-creation'
],
tableData:
bigqueryApi
?.
tabledata
,
tests:
tests
,
);
}
Future
<
void
>
runExtras
()
async
{
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_localizations'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_driver'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'flutter_test'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'packages'
,
'fuchsia_remote_debug_protocol'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_pubRunTest
(
path
.
join
(
flutterRoot
,
'dev'
,
'bots'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_pubRunTest
(
path
.
join
(
flutterRoot
,
'dev'
,
'devicelab'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_pubRunTest
(
path
.
join
(
flutterRoot
,
'dev'
,
'snippets'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'dev'
,
'integration_tests'
,
'android_semantics_testing'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'dev'
,
'manual_tests'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'dev'
,
'tools'
,
'vitool'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'examples'
,
'hello_world'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'examples'
,
'layers'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'examples'
,
'stocks'
),
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'examples'
,
'flutter_gallery'
),
tableData:
bigqueryApi
?.
tabledata
);
// Regression test to ensure that code outside of package:flutter can run
// with --track-widget-creation.
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'examples'
,
'flutter_gallery'
),
options:
<
String
>[
'--track-widget-creation'
],
tableData:
bigqueryApi
?.
tabledata
);
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'examples'
,
'catalog'
),
tableData:
bigqueryApi
?.
tabledata
);
// Smoke test for code generation.
await
_runFlutterTest
(
path
.
join
(
flutterRoot
,
'dev'
,
'integration_tests'
,
'codegen'
),
tableData:
bigqueryApi
?.
tabledata
,
environment:
<
String
,
String
>{
'FLUTTER_EXPERIMENTAL_BUILD'
:
'true'
,
});
}
switch
(
subShard
)
{
case
'widgets'
:
await
runWidgets
();
break
;
case
'framework_other'
:
await
runFrameworkOthers
();
break
;
case
'extras'
:
runExtras
();
break
;
default
:
print
(
'Unknown sub-shard
$subShard
, running all tests!'
);
await
runWidgets
();
await
runFrameworkOthers
();
await
runExtras
();
}
print
(
'
${bold}
DONE: All tests successful.
$reset
'
);
}
...
...
@@ -649,6 +711,7 @@ Future<void> _runFlutterTest(String workingDirectory, {
Duration
timeout
=
_kLongTimeout
,
bq
.
TabledataResourceApi
tableData
,
Map
<
String
,
String
>
environment
,
List
<
String
>
tests
=
const
<
String
>[],
})
async
{
final
List
<
String
>
args
=
<
String
>[
'test'
]..
addAll
(
options
);
if
(
flutterTestArgs
!=
null
&&
flutterTestArgs
.
isNotEmpty
)
...
...
@@ -673,6 +736,9 @@ Future<void> _runFlutterTest(String workingDirectory, {
}
args
.
add
(
script
);
}
args
.
addAll
(
tests
);
if
(!
shouldProcessOutput
)
{
return
runCommand
(
flutter
,
args
,
workingDirectory:
workingDirectory
,
...
...
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