[tests] Print sub-process output in standalone/io/process_working_directory_test
This test runs sub-process and sometimes fails because sub-process has an unexpected exit code. This is an attempt to get more information about the cause of such failures. Issue: https://github.com/dart-lang/sdk/issues/61713 Change-Id: I38eff88b0f94058510078e6e4862d2ad56df2dd7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/454320 Reviewed-by: Alexander Aprelev <aam@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
committed by
Commit Queue
parent
df693c20b0
commit
ef64f00982
@@ -4,9 +4,9 @@
|
||||
//
|
||||
// Process working directory test.
|
||||
|
||||
library ProcessWorkingDirectoryTest;
|
||||
|
||||
import 'dart:convert';
|
||||
import "dart:io";
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import "process_test_util.dart";
|
||||
|
||||
@@ -35,8 +35,8 @@ class ProcessWorkingDirectoryTest {
|
||||
Expect.equals(99, exitCode);
|
||||
directory.deleteSync();
|
||||
});
|
||||
process.stdout.listen((_) {});
|
||||
process.stderr.listen((_) {});
|
||||
process.stdout.transform(utf8.decoder).listen(stdout.write);
|
||||
process.stderr.transform(utf8.decoder).listen(stderr.write);
|
||||
})
|
||||
.catchError((error) {
|
||||
directory.deleteSync();
|
||||
|
||||
Reference in New Issue
Block a user