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

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

Issue 9937007: Oops. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 257 }
258 258
259 /** 259 /**
260 * The default implementation assumes a file is a test if 260 * The default implementation assumes a file is a test if
261 * it ends in "Test.dart". 261 * it ends in "Test.dart".
262 */ 262 */
263 bool isTestFile(String filename) { 263 bool isTestFile(String filename) {
264 // Use the specified predicate, if provided. 264 // Use the specified predicate, if provided.
265 if (isTestFilePredicate != null) return isTestFilePredicate(filename); 265 if (isTestFilePredicate != null) return isTestFilePredicate(filename);
266 266
267 filename.endsWith("Test.dart"); 267 return filename.endsWith("Test.dart");
268 } 268 }
269 269
270 bool listRecursively() => false; 270 bool listRecursively() => false;
271 271
272 String shellPath() => TestUtils.dartShellFileName(configuration); 272 String shellPath() => TestUtils.dartShellFileName(configuration);
273 273
274 List<String> additionalOptions(String filename) => []; 274 List<String> additionalOptions(String filename) => [];
275 275
276 void forEachTest(Function onTest, Map testCache, String globalTempDir(), 276 void forEachTest(Function onTest, Map testCache, String globalTempDir(),
277 [Function onDone = null]) { 277 [Function onDone = null]) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 } 378 }
379 } 379 }
380 } 380 }
381 int shards = configuration['shards']; 381 int shards = configuration['shards'];
382 if (shards > 1) { 382 if (shards > 1) {
383 int shard = configuration['shard']; 383 int shard = configuration['shard'];
384 if (testName.hashCode() % shards != shard - 1) { 384 if (testName.hashCode() % shards != shard - 1) {
385 return; 385 return;
386 } 386 }
387 } 387 }
388 388
389 Set<String> expectations = testExpectations.expectations(testName); 389 Set<String> expectations = testExpectations.expectations(testName);
390 if (configuration['report']) { 390 if (configuration['report']) {
391 // Tests with multiple VMOptions are counted more than once. 391 // Tests with multiple VMOptions are counted more than once.
392 for (var dummy in optionsFromFile["vmOptions"]) { 392 for (var dummy in optionsFromFile["vmOptions"]) {
393 SummaryReport.add(expectations); 393 SummaryReport.add(expectations);
394 } 394 }
395 } 395 }
396 if (expectations.contains(SKIP)) return; 396 if (expectations.contains(SKIP)) return;
397 397
398 if (TestUtils.isBrowserRuntime(configuration['runtime'])) { 398 if (TestUtils.isBrowserRuntime(configuration['runtime'])) {
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 * $noCrash tests are expected to be flaky but not crash 1290 * $noCrash tests are expected to be flaky but not crash
1291 * $pass tests are expected to pass 1291 * $pass tests are expected to pass
1292 * $failOk tests are expected to fail that we won't fix 1292 * $failOk tests are expected to fail that we won't fix
1293 * $fail tests are expected to fail that we should fix 1293 * $fail tests are expected to fail that we should fix
1294 * $crash tests are expected to crash that we should fix 1294 * $crash tests are expected to crash that we should fix
1295 * $timeout tests are allowed to timeout 1295 * $timeout tests are allowed to timeout
1296 """; 1296 """;
1297 print(report); 1297 print(report);
1298 } 1298 }
1299 } 1299 }
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