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
1747adb6
Unverified
Commit
1747adb6
authored
Jan 27, 2021
by
Dan Field
Committed by
GitHub
Jan 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop mockito for flutter_goldens (#74782)
parent
fe921211
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
196 additions
and
109 deletions
+196
-109
pubspec.yaml
packages/flutter_goldens/pubspec.yaml
+1
-4
flutter_goldens_test.dart
packages/flutter_goldens/test/flutter_goldens_test.dart
+176
-76
skia_client.dart
packages/flutter_goldens_client/lib/skia_client.dart
+19
-29
No files found.
packages/flutter_goldens/pubspec.yaml
View file @
1747adb6
...
...
@@ -30,7 +30,4 @@ dependencies:
test_api
:
0.2.19-nullsafety.6
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
vector_math
:
2.1.0-nullsafety.5
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dev_dependencies
:
mockito
:
4.1.1
# PUBSPEC CHECKSUM: 49d5
# PUBSPEC CHECKSUM: ae8f
packages/flutter_goldens/test/flutter_goldens_test.dart
View file @
1747adb6
This diff is collapsed.
Click to expand it.
packages/flutter_goldens_client/lib/skia_client.dart
View file @
1747adb6
...
...
@@ -79,7 +79,8 @@ class SkiaGoldClient {
Future
<
void
>
auth
()
async
{
if
(
await
clientIsAuthorized
())
return
;
final
List
<
String
>
authArguments
=
<
String
>[
final
List
<
String
>
authCommand
=
<
String
>[
_goldctl
,
'auth'
,
'--work-dir'
,
workDirectory
.
childDirectory
(
'temp'
)
...
...
@@ -87,10 +88,7 @@ class SkiaGoldClient {
'--luci'
,
];
final
io
.
ProcessResult
result
=
await
io
.
Process
.
run
(
_goldctl
,
authArguments
,
);
final
io
.
ProcessResult
result
=
await
process
.
run
(
authCommand
);
if
(
result
.
exitCode
!=
0
)
{
final
StringBuffer
buf
=
StringBuffer
()
...
...
@@ -118,7 +116,8 @@ class SkiaGoldClient {
await
failures
.
create
();
final
String
commitHash
=
await
_getCurrentCommit
();
final
List
<
String
>
imgtestInitArguments
=
<
String
>[
final
List
<
String
>
imgtestInitCommand
=
<
String
>[
_goldctl
,
'imgtest'
,
'init'
,
'--instance'
,
'flutter'
,
'--work-dir'
,
workDirectory
...
...
@@ -130,19 +129,16 @@ class SkiaGoldClient {
'--passfail'
,
];
if
(
imgtestInit
Arguments
.
contains
(
null
))
{
if
(
imgtestInit
Command
.
contains
(
null
))
{
final
StringBuffer
buf
=
StringBuffer
()
..
writeln
(
'A null argument was provided for Skia Gold imgtest init.'
)
..
writeln
(
'Please confirm the settings of your golden file test.'
)
..
writeln
(
'Arguments provided:'
);
imgtestInit
Arguments
.
forEach
(
buf
.
writeln
);
imgtestInit
Command
.
forEach
(
buf
.
writeln
);
throw
Exception
(
buf
.
toString
());
}
final
io
.
ProcessResult
result
=
await
io
.
Process
.
run
(
_goldctl
,
imgtestInitArguments
,
);
final
io
.
ProcessResult
result
=
await
process
.
run
(
imgtestInitCommand
);
if
(
result
.
exitCode
!=
0
)
{
final
StringBuffer
buf
=
StringBuffer
()
...
...
@@ -167,7 +163,8 @@ class SkiaGoldClient {
/// The [testName] and [goldenFile] parameters reference the current
/// comparison being evaluated by the [FlutterPostSubmitFileComparator].
Future
<
bool
>
imgtestAdd
(
String
testName
,
File
goldenFile
)
async
{
final
List
<
String
>
imgtestArguments
=
<
String
>[
final
List
<
String
>
imgtestCommand
=
<
String
>[
_goldctl
,
'imgtest'
,
'add'
,
'--work-dir'
,
workDirectory
.
childDirectory
(
'temp'
)
...
...
@@ -176,10 +173,7 @@ class SkiaGoldClient {
'--png-file'
,
goldenFile
.
path
,
];
final
io
.
ProcessResult
result
=
await
io
.
Process
.
run
(
_goldctl
,
imgtestArguments
,
);
final
io
.
ProcessResult
result
=
await
process
.
run
(
imgtestCommand
);
if
(
result
.
exitCode
!=
0
)
{
// We do not want to throw for non-zero exit codes here, as an intentional
...
...
@@ -205,7 +199,8 @@ class SkiaGoldClient {
await
failures
.
create
();
final
String
commitHash
=
await
_getCurrentCommit
();
final
List
<
String
>
imgtestInitArguments
=
<
String
>[
final
List
<
String
>
imgtestInitCommand
=
<
String
>[
_goldctl
,
'imgtest'
,
'init'
,
'--instance'
,
'flutter'
,
'--work-dir'
,
workDirectory
...
...
@@ -220,19 +215,16 @@ class SkiaGoldClient {
...
getCIArguments
(),
];
if
(
imgtestInit
Arguments
.
contains
(
null
))
{
if
(
imgtestInit
Command
.
contains
(
null
))
{
final
StringBuffer
buf
=
StringBuffer
()
..
writeln
(
'A null argument was provided for Skia Gold tryjob init.'
)
..
writeln
(
'Please confirm the settings of your golden file test.'
)
..
writeln
(
'Arguments provided:'
);
imgtestInit
Arguments
.
forEach
(
buf
.
writeln
);
imgtestInit
Command
.
forEach
(
buf
.
writeln
);
throw
Exception
(
buf
.
toString
());
}
final
io
.
ProcessResult
result
=
await
io
.
Process
.
run
(
_goldctl
,
imgtestInitArguments
,
);
final
io
.
ProcessResult
result
=
await
process
.
run
(
imgtestInitCommand
);
if
(
result
.
exitCode
!=
0
)
{
final
StringBuffer
buf
=
StringBuffer
()
...
...
@@ -257,7 +249,8 @@ class SkiaGoldClient {
/// The [testName] and [goldenFile] parameters reference the current
/// comparison being evaluated by the [FlutterPreSubmitFileComparator].
Future
<
void
>
tryjobAdd
(
String
testName
,
File
goldenFile
)
async
{
final
List
<
String
>
imgtestArguments
=
<
String
>[
final
List
<
String
>
imgtestCommand
=
<
String
>[
_goldctl
,
'imgtest'
,
'add'
,
'--work-dir'
,
workDirectory
.
childDirectory
(
'temp'
)
...
...
@@ -266,10 +259,7 @@ class SkiaGoldClient {
'--png-file'
,
goldenFile
.
path
,
];
final
io
.
ProcessResult
result
=
await
io
.
Process
.
run
(
_goldctl
,
imgtestArguments
,
);
final
io
.
ProcessResult
result
=
await
process
.
run
(
imgtestCommand
);
final
String
/*!*/
resultStdout
=
result
.
stdout
.
toString
();
if
(
result
.
exitCode
!=
0
&&
...
...
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