Skip to content

CP-1124 Fix browser file detection (dart2js output changed) #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 20, 2015
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
3 changes: 2 additions & 1 deletion lib/src/tasks/coverage/api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,8 @@ class CoverageTask extends Task {
// TODO: When dart2js has fixed the issue with their exitcode we should
// rely on the exitcode instead of the stdout.
isBrowserTest = pr.stdout != null &&
(pr.stdout as String).contains('Error: Library not found');
(pr.stdout as String)
.contains(new RegExp(r'Error: Library not (found|supported)'));
}

String _observatoryFailPattern = 'Could not start Observatory HTTP server';
Expand Down
5 changes: 3 additions & 2 deletions lib/src/tasks/test/api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ TestTask test(
StreamController stdoutc = new StreamController();
process.stdout.listen((line) {
stdoutc.add(line);
if (line.contains('All tests passed!') ||
line.contains('Some tests failed.')) {
if ((line.contains('All tests passed!') ||
line.contains('Some tests failed.')) &&
!outputProcessed.isCompleted) {
task.testSummary = line;
outputProcessed.complete();
}
Expand Down
4 changes: 2 additions & 2 deletions test/integration/coverage_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import 'package:dart_dev/util.dart' show TaskProcess;
import 'package:test/test.dart';

const String projectWithDartFile = 'test/fixtures/coverage/non_test_file';
const String projectWithVmTests = 'test/fixtures/coverage/browser';
const String projectWithBrowserTests = 'test/fixtures/coverage/vm';
const String projectWithBrowserTests = 'test/fixtures/coverage/browser';
const String projectWithVmTests = 'test/fixtures/coverage/vm';
const String projectWithoutCoveragePackage =
'test/fixtures/coverage/no_coverage_package';

Expand Down