forked from firka/flutter
[web] Log all goldctl commands (flutter/engine#32072)
This commit is contained in:
@@ -93,7 +93,7 @@ class SkiaGoldClient {
|
||||
'--luci',
|
||||
];
|
||||
|
||||
final ProcessResult result = await process.run(authCommand);
|
||||
final ProcessResult result = await _runCommand(authCommand);
|
||||
|
||||
if (result.exitCode != 0) {
|
||||
final StringBuffer buf = StringBuffer()
|
||||
@@ -108,6 +108,11 @@ class SkiaGoldClient {
|
||||
}
|
||||
}
|
||||
|
||||
Future<ProcessResult> _runCommand(List<String> command) {
|
||||
print(command.join(' '));
|
||||
return process.run(command);
|
||||
}
|
||||
|
||||
/// Executes the `imgtest init` command in the `goldctl` tool.
|
||||
///
|
||||
/// The `imgtest` command collects and uploads test results to the Skia Gold
|
||||
@@ -143,7 +148,7 @@ class SkiaGoldClient {
|
||||
throw Exception(buf.toString());
|
||||
}
|
||||
|
||||
final ProcessResult result = await process.run(imgtestInitCommand);
|
||||
final ProcessResult result = await _runCommand(imgtestInitCommand);
|
||||
|
||||
if (result.exitCode != 0) {
|
||||
final StringBuffer buf = StringBuffer()
|
||||
@@ -185,7 +190,7 @@ class SkiaGoldClient {
|
||||
..._getMatchingArguments(testName, screenshotSize, isCanvaskitTest),
|
||||
];
|
||||
|
||||
final ProcessResult result = await process.run(imgtestCommand);
|
||||
final ProcessResult result = await _runCommand(imgtestCommand);
|
||||
|
||||
if (result.exitCode != 0) {
|
||||
// We do not want to throw for non-zero exit codes here, as an intentional
|
||||
@@ -214,7 +219,7 @@ class SkiaGoldClient {
|
||||
await failures.create();
|
||||
final String commitHash = await _getCurrentCommit();
|
||||
|
||||
final List<String> imgtestInitCommand = <String>[
|
||||
final List<String> tryjobInitCommand = <String>[
|
||||
_goldctl,
|
||||
'imgtest', 'init',
|
||||
'--instance', _instance,
|
||||
@@ -231,16 +236,16 @@ class SkiaGoldClient {
|
||||
...getCIArguments(),
|
||||
];
|
||||
|
||||
if (imgtestInitCommand.contains(null)) {
|
||||
if (tryjobInitCommand.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:');
|
||||
imgtestInitCommand.forEach(buf.writeln);
|
||||
tryjobInitCommand.forEach(buf.writeln);
|
||||
throw Exception(buf.toString());
|
||||
}
|
||||
|
||||
final ProcessResult result = await process.run(imgtestInitCommand);
|
||||
final ProcessResult result = await _runCommand(tryjobInitCommand);
|
||||
|
||||
if (result.exitCode != 0) {
|
||||
final StringBuffer buf = StringBuffer()
|
||||
@@ -273,7 +278,7 @@ class SkiaGoldClient {
|
||||
) async {
|
||||
await _tryjobInit();
|
||||
|
||||
final List<String> imgtestCommand = <String>[
|
||||
final List<String> tryjobCommand = <String>[
|
||||
_goldctl,
|
||||
'imgtest', 'add',
|
||||
'--work-dir', _tempPath,
|
||||
@@ -282,7 +287,7 @@ class SkiaGoldClient {
|
||||
..._getMatchingArguments(testName, screenshotSize, isCanvaskitTest),
|
||||
];
|
||||
|
||||
final ProcessResult result = await process.run(imgtestCommand);
|
||||
final ProcessResult result = await _runCommand(tryjobCommand);
|
||||
|
||||
final String resultStdout = result.stdout.toString();
|
||||
if (result.exitCode != 0 &&
|
||||
|
||||
Reference in New Issue
Block a user