| 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 /** | 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 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1499 * the main script using 'test_suite.dart' is not there, the main | 1499 * the main script using 'test_suite.dart' is not there, the main |
| 1500 * script must set this to '.../dart/tools/test.dart'. | 1500 * script must set this to '.../dart/tools/test.dart'. |
| 1501 */ | 1501 */ |
| 1502 static String testScriptPath = new Options().script; | 1502 static String testScriptPath = new Options().script; |
| 1503 | 1503 |
| 1504 /** | 1504 /** |
| 1505 * Creates a directory using a [relativePath] to an existing | 1505 * Creates a directory using a [relativePath] to an existing |
| 1506 * [base] directory if that [relativePath] does not already exist. | 1506 * [base] directory if that [relativePath] does not already exist. |
| 1507 */ | 1507 */ |
| 1508 static Directory mkdirRecursive(Path base, Path relativePath) { | 1508 static Directory mkdirRecursive(Path base, Path relativePath) { |
| 1509 print("======= $base|relativePath|${relativePath.isAbsolute}|${relativePath.
segments}"); |
| 1509 if (relativePath.isAbsolute) { | 1510 if (relativePath.isAbsolute) { |
| 1510 base = new Path('/'); | 1511 base = new Path('/'); |
| 1511 } | 1512 } |
| 1512 Directory dir = new Directory.fromPath(base); | 1513 Directory dir = new Directory.fromPath(base); |
| 1513 Expect.isTrue(dir.existsSync(), | 1514 Expect.isTrue(dir.existsSync(), |
| 1514 "Expected ${dir} to already exist"); | 1515 "Expected ${dir} to already exist"); |
| 1515 var segments = relativePath.segments(); | 1516 var segments = relativePath.segments(); |
| 1516 for (String segment in segments) { | 1517 for (String segment in segments) { |
| 1517 base = base.append(segment); | 1518 base = base.append(segment); |
| 1518 dir = new Directory.fromPath(base); | 1519 dir = new Directory.fromPath(base); |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1674 * $pass tests are expected to pass | 1675 * $pass tests are expected to pass |
| 1675 * $failOk tests are expected to fail that we won't fix | 1676 * $failOk tests are expected to fail that we won't fix |
| 1676 * $fail tests are expected to fail that we should fix | 1677 * $fail tests are expected to fail that we should fix |
| 1677 * $crash tests are expected to crash that we should fix | 1678 * $crash tests are expected to crash that we should fix |
| 1678 * $timeout tests are allowed to timeout | 1679 * $timeout tests are allowed to timeout |
| 1679 * $compileErrorSkip tests are skipped on browsers due to compile-time error | 1680 * $compileErrorSkip tests are skipped on browsers due to compile-time error |
| 1680 """; | 1681 """; |
| 1681 print(report); | 1682 print(report); |
| 1682 } | 1683 } |
| 1683 } | 1684 } |
| OLD | NEW |