Moar tests on Windows (#14148)

This commit is contained in:
Michael Goderbauer 2018-01-17 16:08:07 -08:00 committed by GitHub
parent 6da8ec6bd0
commit bf7cc09625
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 12 deletions

View file

@ -4,7 +4,6 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io' as io;
import 'package:args/command_runner.dart';
import 'package:flutter_tools/src/base/file_system.dart';
@ -212,11 +211,7 @@ void main() {
}
}
// TODO(pq): enable when sky_shell is available
if (!io.Platform.isWindows) {
// Verify that the sample widget test runs cleanly.
await _runFlutterTest(projectDir, target: fs.path.join(projectDir.path, 'test', 'widget_test.dart'));
}
await _runFlutterTest(projectDir, target: fs.path.join(projectDir.path, 'test', 'widget_test.dart'));
// Generated Xcode settings
final String xcodeConfigPath = fs.path.join('ios', 'Flutter', 'Generated.xcconfig');

View file

@ -26,28 +26,28 @@ void main() {
testUsingContext('report nice errors for exceptions thrown within testWidgets()', () async {
Cache.flutterRoot = '../..';
return _testFile('exception_handling', automatedTestsDirectory, flutterTestDirectory);
});
}, skip: io.Platform.isWindows); // Dart on Windows has trouble with unicode characters in output
testUsingContext('report a nice error when a guarded function was called without await', () async {
Cache.flutterRoot = '../..';
return _testFile('test_async_utils_guarded', automatedTestsDirectory, flutterTestDirectory);
});
}, skip: io.Platform.isWindows); // Dart on Windows has trouble with unicode characters in output
testUsingContext('report a nice error when an async function was called without await', () async {
Cache.flutterRoot = '../..';
return _testFile('test_async_utils_unguarded', automatedTestsDirectory, flutterTestDirectory);
});
}, skip: io.Platform.isWindows); // Dart on Windows has trouble with unicode characters in output
testUsingContext('report a nice error when a Ticker is left running', () async {
Cache.flutterRoot = '../..';
return _testFile('ticker', automatedTestsDirectory, flutterTestDirectory);
});
}, skip: io.Platform.isWindows); // Dart on Windows has trouble with unicode characters in output
testUsingContext('report a nice error when a pubspec.yaml is missing a flutter_test dependency', () async {
final String missingDependencyTests = fs.path.join('..', '..', 'dev', 'missing_dependency_tests');
Cache.flutterRoot = '../..';
return _testFile('trivial', missingDependencyTests, missingDependencyTests);
});
}, skip: io.Platform.isWindows); // Dart on Windows has trouble with unicode characters in output
testUsingContext('run a test when its name matches a regexp', () async {
Cache.flutterRoot = '../..';
@ -82,7 +82,7 @@ void main() {
expect(result.exitCode, 0);
});
}, skip: io.Platform.isWindows); // TODO(goderbauer): enable when sky_shell is available
});
}
Future<Null> _testFile(String testName, String workingDirectory, String testDirectory) async {