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
1374a413
Unverified
Commit
1374a413
authored
Nov 27, 2019
by
Kate Lovett
Committed by
GitHub
Nov 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide debug output for Gold uploads on post-submit (#45704)
parent
e4b809b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
flutter_goldens.dart
packages/flutter_goldens/lib/flutter_goldens.dart
+4
-2
skia_client.dart
packages/flutter_goldens_client/lib/skia_client.dart
+19
-3
No files found.
packages/flutter_goldens/lib/flutter_goldens.dart
View file @
1374a413
...
...
@@ -4,6 +4,7 @@
import
'dart:async'
;
import
'dart:io'
as
io
;
import
'dart:math'
as
math
;
import
'dart:typed_data'
;
import
'package:file/file.dart'
;
...
...
@@ -130,7 +131,7 @@ abstract class FlutterGoldenFileComparator extends GoldenFileComparator {
/// Calculate the appropriate basedir for the current test context.
@protected
@visibleForTesting
static
Directory
getBaseDirectory
(
LocalFileComparator
defaultComparator
,
Platform
platform
)
{
static
Directory
getBaseDirectory
(
LocalFileComparator
defaultComparator
,
Platform
platform
,
{
String
suffix
=
''
}
)
{
const
FileSystem
fs
=
LocalFileSystem
();
final
Directory
flutterRoot
=
fs
.
directory
(
platform
.
environment
[
_kFlutterRootKey
]);
final
Directory
comparisonRoot
=
flutterRoot
.
childDirectory
(
...
...
@@ -138,7 +139,7 @@ abstract class FlutterGoldenFileComparator extends GoldenFileComparator {
'bin'
,
'cache'
,
'pkg'
,
'skia_goldens'
,
'skia_goldens
$suffix
'
,
)
);
final
Directory
testDirectory
=
fs
.
directory
(
defaultComparator
.
basedir
);
...
...
@@ -214,6 +215,7 @@ class FlutterSkiaGoldFileComparator extends FlutterGoldenFileComparator {
final
Directory
baseDirectory
=
FlutterGoldenFileComparator
.
getBaseDirectory
(
defaultComparator
,
platform
,
suffix:
'
${math.Random().nextInt(10000)}
'
,
);
if
(!
baseDirectory
.
existsSync
())
{
...
...
packages/flutter_goldens_client/lib/skia_client.dart
View file @
1374a413
...
...
@@ -121,10 +121,15 @@ class SkiaGoldClient {
.
path
,
];
await
io
.
Process
.
run
(
final
io
.
ProcessResult
result
=
await
io
.
Process
.
run
(
_goldctl
,
authArguments
,
);
if
(
result
.
exitCode
!=
0
)
{
print
(
'goldctl auth stdout:
${result.stdout}
'
);
print
(
'goldctl auth stderr:
${result.stderr}
'
);
}
}
/// Executes the `imgtest init` command in the goldctl tool.
...
...
@@ -158,10 +163,15 @@ class SkiaGoldClient {
throw
NonZeroExitCode
(
1
,
buf
.
toString
());
}
await
io
.
Process
.
run
(
final
io
.
ProcessResult
result
=
await
io
.
Process
.
run
(
_goldctl
,
imgtestInitArguments
,
);
if
(
result
.
exitCode
!=
0
)
{
print
(
'goldctl imgtest init stdout:
${result.stdout}
'
);
print
(
'goldctl imgtest init stderr:
${result.stderr}
'
);
}
}
/// Executes the `imgtest add` command in the goldctl tool.
...
...
@@ -186,10 +196,16 @@ class SkiaGoldClient {
'--png-file'
,
goldenFile
.
path
,
];
await
io
.
Process
.
run
(
final
io
.
ProcessResult
result
=
await
io
.
Process
.
run
(
_goldctl
,
imgtestArguments
,
);
if
(
result
.
exitCode
!=
0
)
{
print
(
'goldctl imgtest add stdout:
${result.stdout}
'
);
print
(
'goldctl imgtest add stderr:
${result.stderr}
'
);
}
return
true
;
}
...
...
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