Skip to content

Commit ff0ab6b

Browse files
authored
Send q once (#149767)
The previous expression `success || line.contains('--- TEST FAILED ---')` made it such that as soon as success is reported, the test would send "q" on every line of stdout, which is wrong. This fixes the condition such that "q" is sent once, only when `--- TEST SUCCEEDED ---` or `--- TEST FAILED ---` is printed.
1 parent 0708f3c commit ff0ab6b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

dev/bots/suite_runners/run_web_tests.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,7 @@ class WebTestsSuite {
521521
flutter,
522522
<String>[
523523
'run',
524+
'--verbose',
524525
'--debug',
525526
'-d',
526527
'chrome',
@@ -533,10 +534,15 @@ class WebTestsSuite {
533534
],
534535
outputMode: OutputMode.capture,
535536
outputListener: (String line, Process process) {
537+
bool shutdownFlutterTool = false;
536538
if (line.contains('--- TEST SUCCEEDED ---')) {
537539
success = true;
540+
shutdownFlutterTool = true;
538541
}
539-
if (success || line.contains('--- TEST FAILED ---')) {
542+
if (line.contains('--- TEST FAILED ---')) {
543+
shutdownFlutterTool = true;
544+
}
545+
if (shutdownFlutterTool) {
540546
process.stdin.add('q'.codeUnits);
541547
}
542548
},

0 commit comments

Comments
 (0)