Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #library("test_suite"); | 5 #library("test_suite"); |
| 6 | 6 |
| 7 #import("dart:io"); | 7 #import("dart:io"); |
| 8 #import("status_file_parser.dart"); | 8 #import("status_file_parser.dart"); |
| 9 #import("test_runner.dart"); | 9 #import("test_runner.dart"); |
| 10 #import("multitest.dart"); | 10 #import("multitest.dart"); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 ReadTestExpectationsInto(testExpectations, | 217 ReadTestExpectationsInto(testExpectations, |
| 218 '$dartDir/$statusFilePath', | 218 '$dartDir/$statusFilePath', |
| 219 configuration, | 219 configuration, |
| 220 statusFileRead); | 220 statusFileRead); |
| 221 } | 221 } |
| 222 } | 222 } |
| 223 | 223 |
| 224 void processDirectory() { | 224 void processDirectory() { |
| 225 directoryPath = '$dartDir/$directoryPath'; | 225 directoryPath = '$dartDir/$directoryPath'; |
| 226 Directory dir = new Directory(directoryPath); | 226 Directory dir = new Directory(directoryPath); |
| 227 if (!dir.existsSync()) { | |
|
Mads Ager (google)
2012/02/02 14:33:05
Since you really want this to be async why not use
| |
| 228 print('Directory containing tests not found: $directoryPath'); | |
| 229 // All paths through test enumeration must be asynchronous. | |
| 230 new Timer((ignored){ directoryListingDone(false); }, 0); | |
| 231 return; | |
| 232 } | |
| 233 | |
| 227 dir.errorHandler = (s) { | 234 dir.errorHandler = (s) { |
| 228 throw s; | 235 throw s; |
| 229 }; | 236 }; |
| 230 dir.fileHandler = processFile; | 237 dir.fileHandler = processFile; |
| 231 dir.doneHandler = directoryListingDone; | 238 dir.doneHandler = directoryListingDone; |
| 232 dir.list(recursive: listRecursively()); | 239 dir.list(recursive: listRecursively()); |
| 233 } | 240 } |
| 234 | 241 |
| 235 void enqueueTestCaseFromTestInformation(TestInformation info) { | 242 void enqueueTestCaseFromTestInformation(TestInformation info) { |
| 236 var filename = info.filename; | 243 var filename = info.filename; |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1066 * $noCrash tests are expected to be flaky but not crash | 1073 * $noCrash tests are expected to be flaky but not crash |
| 1067 * $pass tests are expected to pass | 1074 * $pass tests are expected to pass |
| 1068 * $failOk tests are expected to fail that we won't fix | 1075 * $failOk tests are expected to fail that we won't fix |
| 1069 * $fail tests are expected to fail that we should fix | 1076 * $fail tests are expected to fail that we should fix |
| 1070 * $crash tests are expected to crash that we should fix | 1077 * $crash tests are expected to crash that we should fix |
| 1071 * $timeout tests are allowed to timeout | 1078 * $timeout tests are allowed to timeout |
| 1072 """; | 1079 """; |
| 1073 print(report); | 1080 print(report); |
| 1074 } | 1081 } |
| 1075 } | 1082 } |
| OLD | NEW |