Skip to content

Commit ef64f00

Browse files
alexmarkovCommit Queue
authored andcommitted
[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: #61713 Change-Id: I38eff88b0f94058510078e6e4862d2ad56df2dd7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/454320 Reviewed-by: Alexander Aprelev <[email protected]> Commit-Queue: Alexander Markov <[email protected]>
1 parent df693c2 commit ef64f00

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/standalone/io/process_working_directory_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
//
55
// Process working directory test.
66

7-
library ProcessWorkingDirectoryTest;
8-
7+
import 'dart:convert';
98
import "dart:io";
9+
1010
import "package:expect/expect.dart";
1111
import "process_test_util.dart";
1212

@@ -35,8 +35,8 @@ class ProcessWorkingDirectoryTest {
3535
Expect.equals(99, exitCode);
3636
directory.deleteSync();
3737
});
38-
process.stdout.listen((_) {});
39-
process.stderr.listen((_) {});
38+
process.stdout.transform(utf8.decoder).listen(stdout.write);
39+
process.stderr.transform(utf8.decoder).listen(stderr.write);
4040
})
4141
.catchError((error) {
4242
directory.deleteSync();

0 commit comments

Comments
 (0)