[gardening] Add stdout/stderr from subprocess if subprocess failed and makes test fail

Locally this test doesn't seem to fail though it did so on a nightly builder.
If the test fails again we'll have more information on what goes wrong.

TEST=Adding more information to test.

Change-Id: Id5ca71d42322c813ba3cfd56e9dfe335160e2e7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196497
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
This commit is contained in:
Martin Kustermann 2021-04-23 10:23:31 +00:00 committed by commit-bot@chromium.org
parent 06bc0040cc
commit e50a59d2f2
2 changed files with 10 additions and 0 deletions

View file

@ -35,6 +35,11 @@ main() {
..add(script),
workingDirectory: nonAsciiDir.path,
environment: {'DART_CRASHPAD_HANDLER': ''}).then((result) {
if (result.exitCode != 0) {
print('exitCode:\n${result.exitCode}');
print('stdout:\n${result.stdout}');
print('stderr:\n${result.stderr}');
}
Expect.equals(0, result.exitCode);
tempDir.deleteSync(recursive: true);
asyncEnd();

View file

@ -35,6 +35,11 @@ main() {
..add(script),
workingDirectory: nonAsciiDir.path,
environment: {'DART_CRASHPAD_HANDLER': ''}).then((result) {
if (result.exitCode != 0) {
print('exitCode:\n${result.exitCode}');
print('stdout:\n${result.stdout}');
print('stderr:\n${result.stderr}');
}
Expect.equals(0, result.exitCode);
tempDir.deleteSync(recursive: true);
asyncEnd();