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
9cd9680b
Unverified
Commit
9cd9680b
authored
Oct 10, 2019
by
Yegor
Committed by
GitHub
Oct 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shard web tests; enable semantics tests on the Web (#42203)
Shard web tests; enable semantics tests on the Web
parent
991153ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
4 deletions
+44
-4
.cirrus.yml
.cirrus.yml
+23
-2
test.dart
dev/bots/test.dart
+21
-2
No files found.
.cirrus.yml
View file @
9cd9680b
...
...
@@ -152,10 +152,31 @@ task:
container
:
cpu
:
8
memory
:
24G
-
name
:
web_tests-linux
allow_failures
:
true
-
name
:
web_tests-linux
-shard-0
use_compute_credits
:
$CIRRUS_USER_COLLABORATOR == 'true'
env
:
SHARD
:
web_tests
WEB_SHARD
:
0
test_script
:
-
dart --enable-asserts ./dev/bots/test.dart
container
:
cpu
:
4
memory
:
12G
-
name
:
web_tests-linux-shard-1
use_compute_credits
:
$CIRRUS_USER_COLLABORATOR == 'true'
env
:
SHARD
:
web_tests
WEB_SHARD
:
1
test_script
:
-
dart --enable-asserts ./dev/bots/test.dart
container
:
cpu
:
4
memory
:
12G
-
name
:
web_tests-linux-shard-2
use_compute_credits
:
$CIRRUS_USER_COLLABORATOR == 'true'
env
:
SHARD
:
web_tests
WEB_SHARD
:
2
test_script
:
-
dart --enable-asserts ./dev/bots/test.dart
container
:
...
...
dev/bots/test.dart
View file @
9cd9680b
...
...
@@ -445,7 +445,6 @@ Future<void> _runWebTests() async {
'test/material'
,
'test/painting'
,
'test/rendering'
,
'test/semantics'
,
'test/widgets'
,
];
...
...
@@ -686,10 +685,16 @@ class EvalResult {
final
int
exitCode
;
}
/// The number of Cirrus jobs that run web tests in parallel.
///
/// WARNING: if you change this number, also change .cirrus.yml
/// and make sure it runs _all_ shards.
const
int
_kWebShardCount
=
3
;
Future
<
void
>
_runFlutterWebTest
(
String
workingDirectory
,
{
List
<
String
>
tests
,
})
async
{
final
List
<
String
>
allTests
=
<
String
>[];
List
<
String
>
allTests
=
<
String
>[];
for
(
String
testDirPath
in
tests
)
{
final
Directory
testDir
=
Directory
(
path
.
join
(
workingDirectory
,
testDirPath
));
allTests
.
addAll
(
...
...
@@ -699,6 +704,20 @@ Future<void> _runFlutterWebTest(String workingDirectory, {
.
map
((
File
file
)
=>
path
.
relative
(
file
.
path
,
from:
workingDirectory
))
);
}
// If a shard is specified only run tests in that shard.
final
int
webShard
=
int
.
tryParse
(
Platform
.
environment
[
'WEB_SHARD'
]
??
'n/a'
);
if
(
webShard
!=
null
)
{
if
(
webShard
>=
_kWebShardCount
)
{
throw
'WEB_SHARD must be <= _kWebShardCount, but was
$webShard
'
;
}
final
List
<
String
>
shard
=
<
String
>[];
for
(
int
i
=
webShard
;
i
<
allTests
.
length
;
i
+=
_kWebShardCount
)
{
shard
.
add
(
allTests
[
i
]);
}
allTests
=
shard
;
}
print
(
allTests
.
join
(
'
\n
'
));
print
(
'
${allTests.length}
tests total'
);
...
...
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