Unverified Commit 12cf9de6 authored by Christopher Fujino's avatar Christopher Fujino Committed by GitHub

Fix mac tool_integration_tests with Xcode 15 (#133217)

Fixes https://github.com/flutter/flutter/issues/132990
parent 9632f821
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment