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
a84ac2ec
Unverified
Commit
a84ac2ec
authored
Apr 22, 2021
by
Abhishek Ghaskata
Committed by
GitHub
Apr 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate customer_testing to null safety (#80841)
parent
78d931ea
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
runner.dart
dev/customer_testing/lib/runner.dart
+4
-4
pubspec.yaml
dev/customer_testing/pubspec.yaml
+1
-1
run_tests.dart
dev/customer_testing/run_tests.dart
+5
-5
No files found.
dev/customer_testing/lib/runner.dart
View file @
a84ac2ec
...
...
@@ -15,7 +15,7 @@ Future<bool> runTests({
bool
verbose
=
false
,
int
numberShards
=
1
,
int
shardIndex
=
0
,
List
<
File
>
files
,
required
List
<
File
>
files
,
})
async
{
if
(
verbose
)
print
(
'Starting run_tests.dart...'
);
...
...
@@ -66,7 +66,7 @@ Future<bool> runTests({
if
(
verbose
)
print
(
'Created temporary directory:
${checkout.path}
'
);
try
{
bool
success
;
bool
?
success
;
bool
showContacts
=
false
;
for
(
final
String
fetchCommand
in
instructions
.
fetch
)
{
success
=
await
shell
(
fetchCommand
,
checkout
,
verbose:
verbose
,
silentFailure:
skipOnFetchFailure
);
...
...
@@ -86,7 +86,7 @@ Future<bool> runTests({
}
}
assert
(
success
!=
null
);
if
(
success
)
{
if
(
success
==
true
)
{
if
(
verbose
)
print
(
'Running tests...'
);
final
Directory
tests
=
Directory
(
path
.
join
(
checkout
.
path
,
'tests'
));
...
...
@@ -105,7 +105,7 @@ Future<bool> runTests({
}
}
}
if
(
verbose
&&
success
)
if
(
verbose
&&
success
==
true
)
print
(
'Tests finished.'
);
}
if
(
showContacts
)
{
...
...
dev/customer_testing/pubspec.yaml
View file @
a84ac2ec
...
...
@@ -2,7 +2,7 @@ name: customer_testing
description
:
Tool to run the tests listed in the flutter/tests repository.
environment
:
sdk
:
'
>=2.
9
.0
<3.0.0'
sdk
:
'
>=2.
12
.0
<3.0.0'
dependencies
:
args
:
2.0.0
...
...
dev/customer_testing/run_tests.dart
View file @
a84ac2ec
...
...
@@ -78,13 +78,13 @@ Future<bool> run(List<String> arguments) async {
exit
(
1
);
}
final
int
repeat
=
int
.
tryParse
(
parsedArguments
[
'repeat'
]
as
String
);
final
int
?
repeat
=
int
.
tryParse
(
parsedArguments
[
'repeat'
]
as
String
);
final
bool
skipOnFetchFailure
=
parsedArguments
[
'skip-on-fetch-failure'
]
as
bool
;
final
bool
skipTemplate
=
parsedArguments
[
'skip-template'
]
as
bool
;
final
bool
verbose
=
parsedArguments
[
'verbose'
]
as
bool
;
final
bool
help
=
parsedArguments
[
'help'
]
as
bool
;
final
int
numberShards
=
int
.
tryParse
(
parsedArguments
[
'shards'
]
as
String
);
final
int
shardIndex
=
int
.
tryParse
(
parsedArguments
[
'shard-index'
]
as
String
);
final
int
?
numberShards
=
int
.
tryParse
(
parsedArguments
[
'shards'
]
as
String
);
final
int
?
shardIndex
=
int
.
tryParse
(
parsedArguments
[
'shard-index'
]
as
String
);
final
List
<
File
>
files
=
parsedArguments
.
rest
.
expand
((
String
path
)
=>
Glob
(
path
).
listFileSystemSync
(
const
LocalFileSystem
()))
...
...
@@ -106,10 +106,10 @@ Future<bool> run(List<String> arguments) async {
return
help
;
}
if
(
files
.
length
<
shardIndex
)
if
(
files
.
length
<
shardIndex
!
)
print
(
'Warning: There are more shards than tests. Some shards will not run any tests.'
);
if
(
numberShards
<=
shardIndex
)
{
if
(
numberShards
!
<=
shardIndex
)
{
print
(
'Error: There are more shard indexes than shards.'
);
return
help
;
}
...
...
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