Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(547)

Side by Side Diff: tools/testing/dart/test_suite.dart

Issue 303693006: Code review changes for r36718. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Classes and methods for enumerating and preparing tests. 6 * Classes and methods for enumerating and preparing tests.
7 * 7 *
8 * This library includes: 8 * This library includes:
9 * 9 *
10 * - Creating tests by listing all the Dart files in certain directories, 10 * - Creating tests by listing all the Dart files in certain directories,
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 395
396 Future<Map> discoverPackagesInRepository() { 396 Future<Map> discoverPackagesInRepository() {
397 /* 397 /*
398 * Layout of packages inside the dart repository: 398 * Layout of packages inside the dart repository:
399 * dart/ 399 * dart/
400 * pkg/PACKAGE_NAME 400 * pkg/PACKAGE_NAME
401 * pkg/third_party/PACKAGE_NAME 401 * pkg/third_party/PACKAGE_NAME
402 * third_party/pkg/PACKAGE_NAME 402 * third_party/pkg/PACKAGE_NAME
403 */ 403 */
404 404
405 isValid(packageName) => packageName != 'third_party'; 405 // Directories containing "-" are not valid pub packages and we therefore
406 // do not include them in the list of packages.
407 isValid(packageName) =>
408 packageName != 'third_party' && !packageName.contains('-');
406 409
407 var dartDir = TestUtils.dartDir; 410 var dartDir = TestUtils.dartDir;
408 var futures = [ 411 var futures = [
409 listDir(dartDir.append('pkg'), isValid), 412 listDir(dartDir.append('pkg'), isValid),
410 listDir(dartDir.append('pkg').append('third_party'), isValid), 413 listDir(dartDir.append('pkg').append('third_party'), isValid),
411 listDir(dartDir.append('third_party').append('pkg'), isValid), 414 listDir(dartDir.append('third_party').append('pkg'), isValid),
412 ]; 415 ];
413 return Future.wait(futures).then((results) { 416 return Future.wait(futures).then((results) {
414 var packageDirectories = {}; 417 var packageDirectories = {};
415 for (var result in results) { 418 for (var result in results) {
416 for (var packageTuple in result) { 419 for (var packageTuple in result) {
417 String packageName = packageTuple[0]; 420 String packageName = packageTuple[0];
418
419 // Some packages are pinned to specific versions. We can ignore those
420 // for the purposes of testing.
421 if (packageName.contains('-')) continue;
422
423 String fullPath = packageTuple[1]; 421 String fullPath = packageTuple[1];
424 String yamlFile = 422 String yamlFile =
425 new Path(fullPath).append('pubspec.yaml').toNativePath(); 423 new Path(fullPath).append('pubspec.yaml').toNativePath();
426 if (new File(yamlFile).existsSync()) { 424 if (new File(yamlFile).existsSync()) {
427 packageDirectories[packageName] = fullPath; 425 packageDirectories[packageName] = fullPath;
428 } 426 }
429 } 427 }
430 } 428 }
431 return packageDirectories; 429 return packageDirectories;
432 }); 430 });
(...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after
2224 * $pass tests are expected to pass 2222 * $pass tests are expected to pass
2225 * $failOk tests are expected to fail that we won't fix 2223 * $failOk tests are expected to fail that we won't fix
2226 * $fail tests are expected to fail that we should fix 2224 * $fail tests are expected to fail that we should fix
2227 * $crash tests are expected to crash that we should fix 2225 * $crash tests are expected to crash that we should fix
2228 * $timeout tests are allowed to timeout 2226 * $timeout tests are allowed to timeout
2229 * $compileErrorSkip tests are skipped on browsers due to compile-time error 2227 * $compileErrorSkip tests are skipped on browsers due to compile-time error
2230 """; 2228 """;
2231 print(report); 2229 print(report);
2232 } 2230 }
2233 } 2231 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698