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 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 completeHandler, | 1012 completeHandler, |
1013 new Set<String>.from([PASS]))); | 1013 new Set<String>.from([PASS]))); |
1014 doDone(); | 1014 doDone(); |
1015 } | 1015 } |
1016 | 1016 |
1017 void completeHandler(TestCase testCase) { | 1017 void completeHandler(TestCase testCase) { |
1018 } | 1018 } |
1019 | 1019 |
1020 void computeClassPath() { | 1020 void computeClassPath() { |
1021 classPath = Strings.join( | 1021 classPath = Strings.join( |
1022 ['$buildDir/compiler/lib/dartc.jar', | 1022 ['$buildDir/lib/analysis/darta.jar', |
1023 '$buildDir/compiler/lib/corelib.jar', | 1023 '$buildDir/analysis/darta-tests.jar', |
1024 '$buildDir/compiler-tests.jar', | |
1025 '$buildDir/closure_out/compiler.jar', | |
1026 // Third party libraries. | 1024 // Third party libraries. |
1027 '$dartDir/third_party/args4j/2.0.12/args4j-2.0.12.jar', | 1025 '$dartDir/third_party/args4j/2.0.12/args4j-2.0.12.jar', |
1028 '$dartDir/third_party/guava/r09/guava-r09.jar', | 1026 '$dartDir/third_party/guava/r09/guava-r09.jar', |
1029 '$dartDir/third_party/json/r2_20080312/json.jar', | 1027 '$dartDir/third_party/json/r2_20080312/json.jar', |
1030 '$dartDir/third_party/rhino/1_7R3/js.jar', | |
1031 '$dartDir/third_party/hamcrest/v1_3/hamcrest-core-1.3.0RC2.jar', | |
1032 '$dartDir/third_party/hamcrest/v1_3/hamcrest-generator-1.3.0RC2.jar', | |
1033 '$dartDir/third_party/hamcrest/v1_3/hamcrest-integration-1.3.0RC2.jar', | |
1034 '$dartDir/third_party/hamcrest/v1_3/hamcrest-library-1.3.0RC2.jar', | |
1035 '$dartDir/third_party/junit/v4_8_2/junit.jar'], | 1028 '$dartDir/third_party/junit/v4_8_2/junit.jar'], |
1036 ':'); // Path separator. | 1029 ':'); // Path separator. |
1037 } | 1030 } |
1038 } | 1031 } |
1039 | 1032 |
1040 | 1033 |
1041 class TestUtils { | 1034 class TestUtils { |
1042 /** | 1035 /** |
1043 * Creates a directory using a [relativePath] to an existing | 1036 * Creates a directory using a [relativePath] to an existing |
1044 * [base] directory if that [relativePath] does not already exist. | 1037 * [base] directory if that [relativePath] does not already exist. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1082 } | 1075 } |
1083 return ''; | 1076 return ''; |
1084 } | 1077 } |
1085 | 1078 |
1086 static String executableName(Map configuration) { | 1079 static String executableName(Map configuration) { |
1087 String suffix = executableSuffix(configuration['component']); | 1080 String suffix = executableSuffix(configuration['component']); |
1088 switch (configuration['component']) { | 1081 switch (configuration['component']) { |
1089 case 'vm': | 1082 case 'vm': |
1090 return 'dart$suffix'; | 1083 return 'dart$suffix'; |
1091 case 'dartc': | 1084 case 'dartc': |
1092 return 'compiler/bin/dartc$suffix'; | 1085 return 'analysis/darta$suffix'; |
1093 case 'frog': | 1086 case 'frog': |
1094 case 'leg': | 1087 case 'leg': |
1095 return 'frog/bin/frog$suffix'; | 1088 return 'frog/bin/frog$suffix'; |
1096 case 'frogsh': | 1089 case 'frogsh': |
1097 return 'frog/bin/frogsh$suffix'; | 1090 return 'frog/bin/frogsh$suffix'; |
1098 default: | 1091 default: |
1099 throw "Unknown executable for: ${configuration['component']}"; | 1092 throw "Unknown executable for: ${configuration['component']}"; |
1100 } | 1093 } |
1101 } | 1094 } |
1102 | 1095 |
1103 static String compilerName(Map configuration) { | 1096 static String compilerName(Map configuration) { |
1104 String suffix = executableSuffix(configuration['component']); | 1097 String suffix = executableSuffix(configuration['component']); |
1105 switch (configuration['component']) { | 1098 switch (configuration['component']) { |
1106 case 'dartc': | 1099 case 'dartc': |
1107 return 'compiler/bin/dartc$suffix'; | 1100 return 'analysis/darta$suffix'; |
1108 case 'frogium': | 1101 case 'frogium': |
1109 case 'legium': | 1102 case 'legium': |
1110 case 'webdriver': | 1103 case 'webdriver': |
1111 return 'frog/bin/frog$suffix'; | 1104 return 'frog/bin/frog$suffix'; |
1112 default: | 1105 default: |
1113 throw "Unknown compiler for: ${configuration['component']}"; | 1106 throw "Unknown compiler for: ${configuration['component']}"; |
1114 } | 1107 } |
1115 } | 1108 } |
1116 | 1109 |
1117 static String dartShellFileName(Map configuration) { | 1110 static String dartShellFileName(Map configuration) { |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1225 * $noCrash tests are expected to be flaky but not crash | 1218 * $noCrash tests are expected to be flaky but not crash |
1226 * $pass tests are expected to pass | 1219 * $pass tests are expected to pass |
1227 * $failOk tests are expected to fail that we won't fix | 1220 * $failOk tests are expected to fail that we won't fix |
1228 * $fail tests are expected to fail that we should fix | 1221 * $fail tests are expected to fail that we should fix |
1229 * $crash tests are expected to crash that we should fix | 1222 * $crash tests are expected to crash that we should fix |
1230 * $timeout tests are allowed to timeout | 1223 * $timeout tests are allowed to timeout |
1231 """; | 1224 """; |
1232 print(report); | 1225 print(report); |
1233 } | 1226 } |
1234 } | 1227 } |
OLD | NEW |