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

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

Issue 10399021: test.dart: include _dart2js.status when creating test suites with 'forDirectory' (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 | « tests/language/language_dart2js.status ('k') | 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 * 250 *
251 * instead of having to create a custom [StandardTestSuite] subclass. In 251 * instead of having to create a custom [StandardTestSuite] subclass. In
252 * particular, if you add 'path/to/mytestsuite' to [TEST_SUITE_DIRECTORIES] 252 * particular, if you add 'path/to/mytestsuite' to [TEST_SUITE_DIRECTORIES]
253 * in test.dart, this will all be set up for you. 253 * in test.dart, this will all be set up for you.
254 */ 254 */
255 factory StandardTestSuite.forDirectory( 255 factory StandardTestSuite.forDirectory(
256 Map configuration, String directory) { 256 Map configuration, String directory) {
257 final name = directory.substring(directory.lastIndexOf('/') + 1); 257 final name = directory.substring(directory.lastIndexOf('/') + 1);
258 258
259 return new StandardTestSuite(configuration, 259 return new StandardTestSuite(configuration,
260 name, directory, ['$directory/$name.status'], 260 name, directory,
261 ['$directory/$name.status', '$directory/${name}_dart2js.status'],
261 (filename) => filename.endsWith('_test.dart'), 262 (filename) => filename.endsWith('_test.dart'),
262 recursive: true); 263 recursive: true);
263 } 264 }
264 265
265 /** 266 /**
266 * The default implementation assumes a file is a test if 267 * The default implementation assumes a file is a test if
267 * it ends in "Test.dart". 268 * it ends in "Test.dart".
268 */ 269 */
269 bool isTestFile(String filename) { 270 bool isTestFile(String filename) {
270 // Use the specified predicate, if provided. 271 // Use the specified predicate, if provided.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 doDone(); 316 doDone();
316 } 317 }
317 new Timer(0, enqueueCachedTests); 318 new Timer(0, enqueueCachedTests);
318 } 319 }
319 } 320 }
320 } 321 }
321 322
322 // Read test expectations from status files. 323 // Read test expectations from status files.
323 testExpectations = new TestExpectations(); 324 testExpectations = new TestExpectations();
324 for (var statusFilePath in statusFilePaths) { 325 for (var statusFilePath in statusFilePaths) {
326 // [forDirectory] adds name_dart2js.status for all tests suites, use it if
327 // it exists, but otherwise skip it and don't fail.
328 if (statusFilePath.endsWith('_dart2js.status')) {
329 File file = new File('$dartDir/$statusFilePath');
330 if (!file.existsSync()) {
331 filesRead++;
332 continue;
333 }
334 }
325 ReadTestExpectationsInto(testExpectations, 335 ReadTestExpectationsInto(testExpectations,
326 '$dartDir/$statusFilePath', 336 '$dartDir/$statusFilePath',
327 configuration, 337 configuration,
328 statusFileRead); 338 statusFileRead);
329 } 339 }
330 } 340 }
331 341
332 void processDirectory() { 342 void processDirectory() {
333 directoryPath = '$dartDir/$directoryPath'; 343 directoryPath = '$dartDir/$directoryPath';
334 Directory dir = new Directory(directoryPath); 344 Directory dir = new Directory(directoryPath);
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 * $noCrash tests are expected to be flaky but not crash 1403 * $noCrash tests are expected to be flaky but not crash
1394 * $pass tests are expected to pass 1404 * $pass tests are expected to pass
1395 * $failOk tests are expected to fail that we won't fix 1405 * $failOk tests are expected to fail that we won't fix
1396 * $fail tests are expected to fail that we should fix 1406 * $fail tests are expected to fail that we should fix
1397 * $crash tests are expected to crash that we should fix 1407 * $crash tests are expected to crash that we should fix
1398 * $timeout tests are allowed to timeout 1408 * $timeout tests are allowed to timeout
1399 """; 1409 """;
1400 print(report); 1410 print(report);
1401 } 1411 }
1402 } 1412 }
OLDNEW
« no previous file with comments | « tests/language/language_dart2js.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698