remove Web test blacklist; all tests should pass now (flutter/engine#11640)

* copy ahem.ttf where web_ui can find it
* remove Web test blacklist; all tests should pass now
This commit is contained in:
Yegor 2019-08-28 12:37:34 -07:00 committed by GitHub
parent 9669b8fa01
commit cf1da7b72c

View File

@ -74,18 +74,13 @@ List<io.File> _flatListSourceFiles(io.Directory directory) {
}
Future<void> _runTests() async {
// TODO(yjbanov): make the following tests pass.
const List<String> testBlacklist = <String>[
'test/text/measurement_test.dart',
'test/paragraph_test.dart',
'test/text_test.dart',
];
_copyAhemFontIntoWebUi();
final List<String> testFiles = io.Directory('test')
.listSync(recursive: true)
.whereType<io.File>()
.map<String>((io.File file) => file.path)
.where((String path) => path.endsWith('_test.dart') && !testBlacklist.contains(path))
.where((String path) => path.endsWith('_test.dart'))
.toList();
final io.Process pubRunTest = await io.Process.start(
@ -111,6 +106,12 @@ Future<void> _runTests() async {
}
}
void _copyAhemFontIntoWebUi() {
final io.File sourceAhemTtf = io.File(pathlib.join(environment.flutterDirectory.path, 'third_party', 'txt', 'third_party', 'fonts', 'ahem.ttf'));
final String destinationAhemTtfPath = pathlib.join(environment.webUiRootDir.path, 'lib', 'assets', 'ahem.ttf');
sourceAhemTtf.copySync(destinationAhemTtfPath);
}
class Environment {
factory Environment() {
final io.File self = io.File.fromUri(io.Platform.script);
@ -157,6 +158,7 @@ class Environment {
final String dartExecutable;
String get pubExecutable => pathlib.join(dartSdkDir.path, 'bin', 'pub');
io.Directory get flutterDirectory => io.Directory(pathlib.join(engineSrcDir.path, 'flutter'));
@override
String toString() {