mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
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.
This commit is contained in:
parent
0708f3c8bc
commit
ff0ab6ba45
@ -521,6 +521,7 @@ class WebTestsSuite {
|
||||
flutter,
|
||||
<String>[
|
||||
'run',
|
||||
'--verbose',
|
||||
'--debug',
|
||||
'-d',
|
||||
'chrome',
|
||||
@ -533,10 +534,15 @@ class WebTestsSuite {
|
||||
],
|
||||
outputMode: OutputMode.capture,
|
||||
outputListener: (String line, Process process) {
|
||||
bool shutdownFlutterTool = false;
|
||||
if (line.contains('--- TEST SUCCEEDED ---')) {
|
||||
success = true;
|
||||
shutdownFlutterTool = true;
|
||||
}
|
||||
if (success || line.contains('--- TEST FAILED ---')) {
|
||||
if (line.contains('--- TEST FAILED ---')) {
|
||||
shutdownFlutterTool = true;
|
||||
}
|
||||
if (shutdownFlutterTool) {
|
||||
process.stdin.add('q'.codeUnits);
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user