Skip to content

Commit 75e652b

Browse files
author
John Messerly
committed
Merge pull request #112 from dart-lang/coverage
fixes #109, code coverage for SDK generation
2 parents c603ce4 + b292b10 commit 75e652b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pkg/dev_compiler/test/codegen_test.dart

+6-3
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ main(arguments) {
116116
});
117117
}
118118

119-
if (dartGen) {
119+
if (dartGen || Platform.environment.containsKey('COVERALLS_TOKEN')) {
120120
group('sdk', () {
121121
// The analyzer does not bubble exception messages for certain internal
122122
// dart:* library failures, such as failing to find
@@ -135,10 +135,13 @@ main(arguments) {
135135
test('devc dart:core', () {
136136
// Get the test SDK. We use a checked in copy so test expectations can
137137
// be generated against a specific SDK version.
138-
var testSdk = path.join(testDir, '..', 'tool', 'input_sdk');
138+
var testSdk = dartGen
139+
? path.join(testDir, '..', 'tool', 'input_sdk')
140+
: path.join(testDir, 'generated_sdk');
139141
var result = compile('dart:core', testSdk, checkSdk: true);
140142
var outputDir = new Directory(path.join(actualDir, 'core'));
141-
var outFile = new File(path.join(actualDir, 'core/core'));
143+
var outFile = new File(
144+
path.join(actualDir, dartGen ? 'core/core' : 'dart/core.js'));
142145
expect(outFile.existsSync(), true,
143146
reason: '${outFile.path} was created for dart:core');
144147
});

0 commit comments

Comments
 (0)