Skip to content

Commit

Permalink
remove Web test blacklist; all tests should pass now (flutter#11640)
Browse files Browse the repository at this point in the history
* copy ahem.ttf where web_ui can find it
* remove Web test blacklist; all tests should pass now
  • Loading branch information
yjbanov authored Aug 28, 2019
1 parent 728ff71 commit 479719b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions lib/web_ui/dev/test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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);
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 479719b

Please sign in to comment.