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

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

Issue 9597015: Update Timer API to take the callback as the last parameter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 | « tools/testing/dart/test_runner.dart ('k') | utils/tests/string_encoding/benchmark_runner.dart » ('j') | 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 processDirectory(); 238 processDirectory();
239 } else { 239 } else {
240 // We rely on enqueueing completing asynchronously so use a 240 // We rely on enqueueing completing asynchronously so use a
241 // timer to make it so. 241 // timer to make it so.
242 void enqueueCachedTests(Timer ignore) { 242 void enqueueCachedTests(Timer ignore) {
243 for (var info in testCache[suiteName]) { 243 for (var info in testCache[suiteName]) {
244 enqueueTestCaseFromTestInformation(info); 244 enqueueTestCaseFromTestInformation(info);
245 } 245 }
246 doDone(); 246 doDone();
247 } 247 }
248 new Timer(enqueueCachedTests, 0); 248 new Timer(0, enqueueCachedTests);
249 } 249 }
250 } 250 }
251 } 251 }
252 252
253 // Read test expectations from status files. 253 // Read test expectations from status files.
254 testExpectations = new TestExpectations(); 254 testExpectations = new TestExpectations();
255 for (var statusFilePath in statusFilePaths) { 255 for (var statusFilePath in statusFilePaths) {
256 ReadTestExpectationsInto(testExpectations, 256 ReadTestExpectationsInto(testExpectations,
257 '$dartDir/$statusFilePath', 257 '$dartDir/$statusFilePath',
258 configuration, 258 configuration,
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 949
950 void forEachTest(Function onTest, 950 void forEachTest(Function onTest,
951 Map testCacheIgnored, 951 Map testCacheIgnored,
952 String globalTempDir(), 952 String globalTempDir(),
953 [Function onDone = null]) { 953 [Function onDone = null]) {
954 doTest = onTest; 954 doTest = onTest;
955 doDone = (onDone != null) ? onDone : (() => null); 955 doDone = (onDone != null) ? onDone : (() => null);
956 956
957 if (configuration['component'] != 'dartc') { 957 if (configuration['component'] != 'dartc') {
958 // Do nothing. Asynchronously report that the suite is enqueued. 958 // Do nothing. Asynchronously report that the suite is enqueued.
959 new Timer((timerUnused){ doDone(); }, 0); 959 new Timer(0, (timerUnused){ doDone(); });
960 return; 960 return;
961 } 961 }
962 RegExp pattern = configuration['selectors']['dartc']; 962 RegExp pattern = configuration['selectors']['dartc'];
963 if (!pattern.hasMatch('junit_tests')) { 963 if (!pattern.hasMatch('junit_tests')) {
964 new Timer((timerUnused){ doDone(); }, 0); 964 new Timer(0, (timerUnused){ doDone(); });
965 return; 965 return;
966 } 966 }
967 967
968 buildDir = TestUtils.buildDir(configuration); 968 buildDir = TestUtils.buildDir(configuration);
969 computeClassPath(); 969 computeClassPath();
970 testClasses = <String>[]; 970 testClasses = <String>[];
971 // Do not read the status file. 971 // Do not read the status file.
972 // All exclusions are hardcoded in this script, as they are in testcfg.py. 972 // All exclusions are hardcoded in this script, as they are in testcfg.py.
973 processDirectory(); 973 processDirectory();
974 } 974 }
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 * $noCrash tests are expected to be flaky but not crash 1193 * $noCrash tests are expected to be flaky but not crash
1194 * $pass tests are expected to pass 1194 * $pass tests are expected to pass
1195 * $failOk tests are expected to fail that we won't fix 1195 * $failOk tests are expected to fail that we won't fix
1196 * $fail tests are expected to fail that we should fix 1196 * $fail tests are expected to fail that we should fix
1197 * $crash tests are expected to crash that we should fix 1197 * $crash tests are expected to crash that we should fix
1198 * $timeout tests are allowed to timeout 1198 * $timeout tests are allowed to timeout
1199 """; 1199 """;
1200 print(report); 1200 print(report);
1201 } 1201 }
1202 } 1202 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | utils/tests/string_encoding/benchmark_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698