Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion lib/src/runner/browser/browser_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion lib/src/runner/configuration/args.dart
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ class _Parser {
var patterns = (_options['name'] as List<String>)
.map/*<Pattern>*/(
(value) => _wrapFormatException('name', () => new RegExp(value)))
.toList()..addAll(_options['plain-name'] as List<String>);
.toList()
..addAll(_options['plain-name'] as List<String>);

var includeTagSet = new Set.from(_options['tags'] ?? [])
..addAll(_options['tag'] ?? []);
Expand Down
26 changes: 14 additions & 12 deletions lib/src/runner/configuration/load.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
29 changes: 14 additions & 15 deletions lib/src/runner/debugger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
10 changes: 4 additions & 6 deletions test/io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,10 @@ void expectStderrEquals(ScheduledProcess test, String expected) =>

/// Expects that the entirety of the line stream [stream] equals [expected].
void _expectStreamEquals(Stream<String> 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
Expand Down