Unverified Commit 9160c6e7 authored by Elias Yishak's avatar Elias Yishak Committed by GitHub

Adding printOnFailure for result of process (#125910)

Adding a `printOnFailure` call into the flakey test to help debug the cause for future failures.

- Reference issue: https://github.com/flutter/flutter/issues/125512
parent c4d6c8c6
......@@ -177,7 +177,7 @@ void main() {
final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter');
final Directory tempDir = fileSystem.systemTempDirectory.createTempSync('flutter_size_test.');
final ProcessResult result = await processManager.run(<String>[
final List<String> command = <String>[
flutterBin,
'build',
'apk',
......@@ -185,7 +185,21 @@ void main() {
'--code-size-directory=${tempDir.path}',
'--target-platform=android-arm64',
'--release',
], workingDirectory: fileSystem.path.join(getFlutterRoot(), 'examples', 'hello_world'));
];
final String workingDirectory = fileSystem.path.join(
getFlutterRoot(),
'examples',
'hello_world',
);
final ProcessResult result = await processManager.run(
command,
workingDirectory: workingDirectory,
);
printOnFailure('workingDirectory: $workingDirectory');
printOnFailure('command:\n${command.join(" ")}');
printOnFailure('stdout:\n${result.stdout}');
printOnFailure('stderr:\n${result.stderr}');
expect(result.exitCode, 0);
expect(tempDir.existsSync(), true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment