Merge pull request #156 from devoncarew/skip_test_windows

skip a test on windows
This commit is contained in:
Devon Carew 2015-10-31 13:57:46 -07:00
commit 4c99319f5d

View File

@ -24,26 +24,30 @@ defineTests() {
temp.deleteSync(recursive: true); temp.deleteSync(recursive: true);
}); });
// Verify that we create a project that is well-formed. // This test consistently times out on our windows bot. The code is already
test('init flutter-simple', () async { // covered on the linux one.
InitCommand command = new InitCommand(); if (!Platform.isWindows) {
CommandRunner runner = new CommandRunner('test_flutter', '') // Verify that we create a project that is well-formed.
..addCommand(command); test('init flutter-simple', () async {
await runner.run(['init', '--out', temp.path]) InitCommand command = new InitCommand();
.then((int code) => expect(code, equals(0))); CommandRunner runner = new CommandRunner('test_flutter', '')
..addCommand(command);
await runner.run(['init', '--out', temp.path])
.then((int code) => expect(code, equals(0)));
String path = p.join(temp.path, 'lib', 'main.dart'); String path = p.join(temp.path, 'lib', 'main.dart');
expect(new File(path).existsSync(), true); expect(new File(path).existsSync(), true);
ProcessResult exec = Process.runSync( ProcessResult exec = Process.runSync(
sdkBinaryName('dartanalyzer'), ['--fatal-warnings', path], sdkBinaryName('dartanalyzer'), ['--fatal-warnings', path],
workingDirectory: temp.path); workingDirectory: temp.path);
if (exec.exitCode != 0) { if (exec.exitCode != 0) {
print(exec.stdout); print(exec.stdout);
print(exec.stderr); print(exec.stderr);
} }
expect(exec.exitCode, 0); expect(exec.exitCode, 0);
}, },
// This test can take a while due to network requests. // This test can take a while due to network requests.
timeout: new Timeout(new Duration(minutes: 3))); timeout: new Timeout(new Duration(minutes: 2)));
}
}); });
} }