| 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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 Directory tempDir = new Directory(tempDirPath); | 651 Directory tempDir = new Directory(tempDirPath); |
| 652 if (!tempDir.existsSync()) { | 652 if (!tempDir.existsSync()) { |
| 653 // Dartium tests can be run with no build step, with no output directory. | 653 // Dartium tests can be run with no build step, with no output directory. |
| 654 // This special case builds the build directory that should be there. | 654 // This special case builds the build directory that should be there. |
| 655 var buildPath = tempDirPath.split('/'); | 655 var buildPath = tempDirPath.split('/'); |
| 656 tempDirPath = buildPath[0]; | 656 tempDirPath = buildPath[0]; |
| 657 if (tempDirPath == '') { | 657 if (tempDirPath == '') { |
| 658 throw new Exception( | 658 throw new Exception( |
| 659 'Non-relative path to build directory in test_suite.dart'); | 659 'Non-relative path to build directory in test_suite.dart'); |
| 660 } | 660 } |
| 661 buildPath.removeRange(0, 1); | 661 if (buildPath.length > 1) { |
| 662 if (buildPath.last() == '') buildPath.removeLast(); | 662 buildPath.removeRange(0, 1); |
| 663 buildPath.addAll(generatedTestPath); | 663 if (buildPath.last() == '') buildPath.removeLast(); |
| 664 generatedTestPath = buildPath; | 664 buildPath.addAll(generatedTestPath); |
| 665 generatedTestPath = buildPath; |
| 666 } |
| 665 tempDir = new Directory(tempDirPath); | 667 tempDir = new Directory(tempDirPath); |
| 666 if (!tempDir.existsSync()) { | 668 if (!tempDir.existsSync()) { |
| 667 tempDir.createSync(); | 669 tempDir.createSync(); |
| 668 } | 670 } |
| 669 } | 671 } |
| 670 tempDirPath = new File(tempDirPath).fullPathSync().replaceAll('\\', '/'); | 672 tempDirPath = new File(tempDirPath).fullPathSync().replaceAll('\\', '/'); |
| 671 return TestUtils.mkdirRecursive(tempDirPath, | 673 return TestUtils.mkdirRecursive(tempDirPath, |
| 672 Strings.join(generatedTestPath, '/')); | 674 Strings.join(generatedTestPath, '/')); |
| 673 } | 675 } |
| 674 | 676 |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1223 * $noCrash tests are expected to be flaky but not crash | 1225 * $noCrash tests are expected to be flaky but not crash |
| 1224 * $pass tests are expected to pass | 1226 * $pass tests are expected to pass |
| 1225 * $failOk tests are expected to fail that we won't fix | 1227 * $failOk tests are expected to fail that we won't fix |
| 1226 * $fail tests are expected to fail that we should fix | 1228 * $fail tests are expected to fail that we should fix |
| 1227 * $crash tests are expected to crash that we should fix | 1229 * $crash tests are expected to crash that we should fix |
| 1228 * $timeout tests are allowed to timeout | 1230 * $timeout tests are allowed to timeout |
| 1229 """; | 1231 """; |
| 1230 print(report); | 1232 print(report); |
| 1231 } | 1233 } |
| 1232 } | 1234 } |
| OLD | NEW |