Fix mac tool_integration_tests with Xcode 15 (#133217)
Fixes https://github.com/flutter/flutter/issues/132990
This commit is contained in:
parent
9632f821f4
commit
12cf9de68b
@ -335,7 +335,10 @@ Future<void> _testFile(
|
||||
reason: '"$testName" returned code ${exec.exitCode}\n\nstdout:\n'
|
||||
'${exec.stdout}\nstderr:\n${exec.stderr}',
|
||||
);
|
||||
final List<String> output = (exec.stdout as String).split('\n');
|
||||
List<String> output = (exec.stdout as String).split('\n');
|
||||
|
||||
output = _removeMacFontServerWarning(output);
|
||||
|
||||
if (output.first.startsWith('Waiting for another flutter command to release the startup lock...')) {
|
||||
output.removeAt(0);
|
||||
}
|
||||
@ -398,6 +401,26 @@ Future<void> _testFile(
|
||||
}
|
||||
}
|
||||
|
||||
final RegExp _fontServerProtocolPattern = RegExp(r'flutter_tester.*Font server protocol version mismatch');
|
||||
final RegExp _unableToConnectToFontDaemonPattern = RegExp(r'flutter_tester.*XType: unable to make a connection to the font daemon!');
|
||||
final RegExp _xtFontStaticRegistryPattern = RegExp(r'flutter_tester.*XType: XTFontStaticRegistry is enabled as fontd is not available');
|
||||
|
||||
// https://github.com/flutter/flutter/issues/132990
|
||||
List<String> _removeMacFontServerWarning(List<String> output) {
|
||||
return output.where((String line) {
|
||||
if (_fontServerProtocolPattern.hasMatch(line)) {
|
||||
return false;
|
||||
}
|
||||
if (_unableToConnectToFontDaemonPattern.hasMatch(line)) {
|
||||
return false;
|
||||
}
|
||||
if (_xtFontStaticRegistryPattern.hasMatch(line)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
Future<ProcessResult> _runFlutterTest(
|
||||
String? testName,
|
||||
String workingDirectory,
|
||||
|
Loading…
x
Reference in New Issue
Block a user