OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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("status_file_parser.dart"); | 7 #import("status_file_parser.dart"); |
8 #import("test_runner.dart"); | 8 #import("test_runner.dart"); |
9 #import("multitest.dart"); | 9 #import("multitest.dart"); |
10 | 10 |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 Map optionsFromFile(String filename) { | 316 Map optionsFromFile(String filename) { |
317 RegExp testOptionsRegExp = const RegExp(@"// VMOptions=(.*)"); | 317 RegExp testOptionsRegExp = const RegExp(@"// VMOptions=(.*)"); |
318 RegExp dartOptionsRegExp = const RegExp(@"// DartOptions=(.*)"); | 318 RegExp dartOptionsRegExp = const RegExp(@"// DartOptions=(.*)"); |
319 RegExp multiTestRegExp = const RegExp(@"/// [0-9][0-9]:(.*)"); | 319 RegExp multiTestRegExp = const RegExp(@"/// [0-9][0-9]:(.*)"); |
320 RegExp leadingHashRegExp = const RegExp(@"^#", multiLine: true); | 320 RegExp leadingHashRegExp = const RegExp(@"^#", multiLine: true); |
321 RegExp isolateStubsRegExp = const RegExp(@"// IsolateStubs=(.*)"); | 321 RegExp isolateStubsRegExp = const RegExp(@"// IsolateStubs=(.*)"); |
322 | 322 |
323 // Read the entire file into a byte buffer and transform it to a | 323 // Read the entire file into a byte buffer and transform it to a |
324 // String. This will treat the file as ascii but the only parts | 324 // String. This will treat the file as ascii but the only parts |
325 // we are interested in will be ascii in any case. | 325 // we are interested in will be ascii in any case. |
326 File file = new File(filename); | 326 RandomAccessFile file = (new File(filename)).openSync(); |
327 file.openSync(); | |
328 List chars = new List(file.lengthSync()); | 327 List chars = new List(file.lengthSync()); |
329 var offset = 0; | 328 var offset = 0; |
330 while (offset != chars.length) { | 329 while (offset != chars.length) { |
331 offset += file.readListSync(chars, offset, chars.length - offset); | 330 offset += file.readListSync(chars, offset, chars.length - offset); |
332 } | 331 } |
333 file.closeSync(); | 332 file.closeSync(); |
334 String contents = new String.fromCharCodes(chars); | 333 String contents = new String.fromCharCodes(chars); |
335 chars = null; | 334 chars = null; |
336 | 335 |
337 // Find the options in the file. | 336 // Find the options in the file. |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 * $noCrash tests are expected to be flaky but not crash | 541 * $noCrash tests are expected to be flaky but not crash |
543 * $pass tests are expected to pass | 542 * $pass tests are expected to pass |
544 * $failOk tests are expected to fail that we won't fix | 543 * $failOk tests are expected to fail that we won't fix |
545 * $fail tests are expected to fail that we should fix | 544 * $fail tests are expected to fail that we should fix |
546 * $crash tests are expected to crash that we should fix | 545 * $crash tests are expected to crash that we should fix |
547 * $timeout tests are allowed to timeout\ | 546 * $timeout tests are allowed to timeout\ |
548 """; | 547 """; |
549 print(report); | 548 print(report); |
550 } | 549 } |
551 } | 550 } |
OLD | NEW |