@@ -3131,22 +3131,25 @@ Future<void> _analyzeProject(String workingDir, { List<String> expectedFailures
3131
3131
}
3132
3132
}
3133
3133
final String stdout = exec.stdout.toString ();
3134
- final List <String > errors;
3134
+ final List <String > errors = < String > [] ;
3135
3135
try {
3136
- errors = const LineSplitter ().convert (stdout)
3137
- .where ((String line) {
3138
- return line.trim ().isNotEmpty &&
3139
- ! line.startsWith ('Analyzing' ) &&
3140
- ! line.contains ('flutter pub get' ) &&
3141
- ! line.contains ('Resolving dependencies' ) &&
3142
- ! line.contains ('Got dependencies' );
3143
- }).map (lineParser).toList ();
3144
-
3145
- // Add debugging for https://github.com/flutter/flutter/issues/111272
3146
- } on RangeError catch (err) {
3136
+ bool analyzeLineFound = false ;
3137
+ const LineSplitter ().convert (stdout).forEach ((String line) {
3138
+ // Conditional to filter out any stdout from `pub get`
3139
+ if (! analyzeLineFound && line.startsWith ('Analyzing' )) {
3140
+ analyzeLineFound = true ;
3141
+ return ;
3142
+ }
3143
+
3144
+ if (analyzeLineFound && line.trim ().isNotEmpty) {
3145
+ errors.add (lineParser (line.trim ()));
3146
+ }
3147
+ });
3148
+ } on Exception catch (err) {
3147
3149
fail ('$err \n\n Complete STDOUT was:\n\n $stdout ' );
3148
3150
}
3149
- expect (errors, unorderedEquals (expectedFailures));
3151
+ expect (errors, unorderedEquals (expectedFailures),
3152
+ reason: 'Failed with stdout:\n\n $stdout ' );
3150
3153
}
3151
3154
3152
3155
Future <void > _getPackages (Directory workingDir) async {
0 commit comments