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 /** | 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 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1021 } | 1021 } |
| 1022 | 1022 |
| 1023 // Create '[build dir]/generated_tests/$compiler-$runtime/$testUniqueName', | 1023 // Create '[build dir]/generated_tests/$compiler-$runtime/$testUniqueName', |
| 1024 // including any intermediate directories that don't exist. | 1024 // including any intermediate directories that don't exist. |
| 1025 // If the tests are run in checked or minified mode we add that to the | 1025 // If the tests are run in checked or minified mode we add that to the |
| 1026 // '$compile-$runtime' directory name. | 1026 // '$compile-$runtime' directory name. |
| 1027 var checked = configuration['checked'] ? '-checked' : ''; | 1027 var checked = configuration['checked'] ? '-checked' : ''; |
| 1028 var minified = configuration['minified'] ? '-minified' : ''; | 1028 var minified = configuration['minified'] ? '-minified' : ''; |
| 1029 var dirName = "${configuration['compiler']}-${configuration['runtime']}" | 1029 var dirName = "${configuration['compiler']}-${configuration['runtime']}" |
| 1030 "$checked$minified"; | 1030 "$checked$minified"; |
| 1031 var generatedTestPath = Strings.join([ | 1031 Path generatedTestPath = new Path.fromNative(buildDir) |
|
ahe
2012/12/03 11:42:39
Nice.
| |
| 1032 buildDir, | 1032 .append('generated_tests') |
| 1033 'generated_tests', | 1033 .append(dirName) |
| 1034 dirName, | 1034 .append(testUniqueName); |
| 1035 testUniqueName | |
| 1036 ], '/'); | |
| 1037 | 1035 |
| 1038 TestUtils.mkdirRecursive(new Path('.'), new Path(generatedTestPath)); | 1036 TestUtils.mkdirRecursive(new Path('.'), generatedTestPath); |
| 1039 return new File(generatedTestPath).fullPathSync().replaceAll('\\', '/'); | 1037 return new File.fromPath(generatedTestPath).fullPathSync() |
| 1038 .replaceAll('\\', '/'); | |
| 1040 } | 1039 } |
| 1041 | 1040 |
| 1042 String get scriptType { | 1041 String get scriptType { |
| 1043 switch (configuration['compiler']) { | 1042 switch (configuration['compiler']) { |
| 1044 case 'none': | 1043 case 'none': |
| 1045 case 'dart2dart': | 1044 case 'dart2dart': |
| 1046 return 'application/dart'; | 1045 return 'application/dart'; |
| 1047 case 'dart2js': | 1046 case 'dart2js': |
| 1048 case 'dartc': | 1047 case 'dartc': |
| 1049 return 'text/javascript'; | 1048 return 'text/javascript'; |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1675 * $pass tests are expected to pass | 1674 * $pass tests are expected to pass |
| 1676 * $failOk tests are expected to fail that we won't fix | 1675 * $failOk tests are expected to fail that we won't fix |
| 1677 * $fail tests are expected to fail that we should fix | 1676 * $fail tests are expected to fail that we should fix |
| 1678 * $crash tests are expected to crash that we should fix | 1677 * $crash tests are expected to crash that we should fix |
| 1679 * $timeout tests are allowed to timeout | 1678 * $timeout tests are allowed to timeout |
| 1680 * $compileErrorSkip tests are skipped on browsers due to compile-time error | 1679 * $compileErrorSkip tests are skipped on browsers due to compile-time error |
| 1681 """; | 1680 """; |
| 1682 print(report); | 1681 print(report); |
| 1683 } | 1682 } |
| 1684 } | 1683 } |
| OLD | NEW |