diff --git a/.travis.yml b/.travis.yml index 47b5912fa..95e99867a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,21 +3,24 @@ sudo: false dart: - dev - stable + - 1.23.0 + - 1.22.1 cache: directories: - $HOME/.pub-cache dart_task: - - test: --platform vm -x content-shell -x chrome -x firefox -x dartium -x phantomjs --timeout 4x - test: --platform dartium install_dartium: true + - test: --platform vm -x content-shell -x chrome -x firefox -x dartium -x phantomjs --timeout 4x - dartfmt - dartanalyzer matrix: - allow_failures: - # Repo was formatted with stable SDK - - dart: dev + exclude: + # Repo was formatted with 1.23.x SDK + - dart: 1.22.1 dart_task: dartfmt - # Pub can hang on tests using dev SDK - - dart: dev - dart_task: + allow_failures: + # VM Tests are flaky – need to investigate + # https://github.com/dart-lang/test/issues/599 + - dart_task: test: --platform vm -x content-shell -x chrome -x firefox -x dartium -x phantomjs --timeout 4x diff --git a/lib/src/runner/browser/browser_manager.dart b/lib/src/runner/browser/browser_manager.dart index 1633a1776..7f25b3886 100644 --- a/lib/src/runner/browser/browser_manager.dart +++ b/lib/src/runner/browser/browser_manager.dart @@ -166,7 +166,8 @@ class BrowserManager { for (var controller in _controllers) { controller.setDebugging(true); } - })..cancel(); + }) + ..cancel(); // Whenever we get a message, no matter which child channel it's for, we the // know browser is still running code which means the user isn't debugging. diff --git a/lib/src/runner/configuration/args.dart b/lib/src/runner/configuration/args.dart index 9db69c36f..67a5efb0f 100644 --- a/lib/src/runner/configuration/args.dart +++ b/lib/src/runner/configuration/args.dart @@ -164,7 +164,8 @@ class _Parser { var patterns = (_options['name'] as List) .map/**/( (value) => _wrapFormatException('name', () => new RegExp(value))) - .toList()..addAll(_options['plain-name'] as List); + .toList() + ..addAll(_options['plain-name'] as List); var includeTagSet = new Set.from(_options['tags'] ?? []) ..addAll(_options['tag'] ?? []); diff --git a/lib/src/runner/configuration/load.dart b/lib/src/runner/configuration/load.dart index 7551bb599..ecba33fe2 100644 --- a/lib/src/runner/configuration/load.dart +++ b/lib/src/runner/configuration/load.dart @@ -83,18 +83,20 @@ class _ConfigurationLoader { value: (valueNode) => _nestedConfig(valueNode, "on_platform value", runnerConfig: false)); - var onOS = _getMap("on_os", key: (keyNode) { - _validate( - keyNode, "on_os key must be a string.", (value) => value is String); - - var os = OperatingSystem.find(keyNode.value); - if (os != null) return os; - - throw new SourceSpanFormatException( - 'Invalid on_os key: No such operating system.', - keyNode.span, - _source); - }, value: (valueNode) => _nestedConfig(valueNode, "on_os value")); + var onOS = _getMap("on_os", + key: (keyNode) { + _validate(keyNode, "on_os key must be a string.", + (value) => value is String); + + var os = OperatingSystem.find(keyNode.value); + if (os != null) return os; + + throw new SourceSpanFormatException( + 'Invalid on_os key: No such operating system.', + keyNode.span, + _source); + }, + value: (valueNode) => _nestedConfig(valueNode, "on_os value")); var presets = _getMap("presets", key: (keyNode) => _parseIdentifierLike(keyNode, "presets key"), diff --git a/lib/src/runner/debugger.dart b/lib/src/runner/debugger.dart index c8e708a1d..e26c5a72a 100644 --- a/lib/src/runner/debugger.dart +++ b/lib/src/runner/debugger.dart @@ -28,21 +28,20 @@ CancelableOperation debug( Engine engine, Reporter reporter, LoadSuite loadSuite) { var debugger; var canceled = false; - return new CancelableOperation.fromFuture( - () async { - // Make the underlying suite null so that the engine doesn't start running - // it immediately. - engine.suiteSink.add(loadSuite.changeSuite((runnerSuite) { - engine.pause(); - return runnerSuite; - })); - - var suite = await loadSuite.suite; - if (canceled || suite == null) return; - - debugger = new _Debugger(engine, reporter, suite); - await debugger.run(); - }(), onCancel: () { + return new CancelableOperation.fromFuture(() async { + // Make the underlying suite null so that the engine doesn't start running + // it immediately. + engine.suiteSink.add(loadSuite.changeSuite((runnerSuite) { + engine.pause(); + return runnerSuite; + })); + + var suite = await loadSuite.suite; + if (canceled || suite == null) return; + + debugger = new _Debugger(engine, reporter, suite); + await debugger.run(); + }(), onCancel: () { canceled = true; // Make sure the load test finishes so the engine can close. engine.resume(); diff --git a/test/io.dart b/test/io.dart index 7eac63003..8ffcd649d 100644 --- a/test/io.dart +++ b/test/io.dart @@ -84,12 +84,10 @@ void expectStderrEquals(ScheduledProcess test, String expected) => /// Expects that the entirety of the line stream [stream] equals [expected]. void _expectStreamEquals(Stream stream, String expected) { - expect( - (() async { - var lines = await stream.toList(); - expect(lines.join("\n").trim(), equals(expected.trim())); - })(), - completes); + expect((() async { + var lines = await stream.toList(); + expect(lines.join("\n").trim(), equals(expected.trim())); + })(), completes); } /// Returns a [StreamMatcher] that asserts that the stream emits strings