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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 var d8Dir = TestUtils.dartDir.append('third_party/d8'); | 217 var d8Dir = TestUtils.dartDir.append('third_party/d8'); |
218 var d8Path = d8Dir.append('${Platform.operatingSystem}/d8$suffix'); | 218 var d8Path = d8Dir.append('${Platform.operatingSystem}/d8$suffix'); |
219 var d8 = d8Path.toNativePath(); | 219 var d8 = d8Path.toNativePath(); |
220 TestUtils.ensureExists(d8, configuration); | 220 TestUtils.ensureExists(d8, configuration); |
221 return d8; | 221 return d8; |
222 } | 222 } |
223 | 223 |
224 String get jsShellFileName { | 224 String get jsShellFileName { |
225 var executableSuffix = getExecutableSuffix('jsshell'); | 225 var executableSuffix = getExecutableSuffix('jsshell'); |
226 var executable = 'jsshell$executableSuffix'; | 226 var executable = 'jsshell$executableSuffix'; |
227 var jsshellDir = '${TestUtils.dartDir}/tools/testing/bin'; | 227 var jsshellDir = '${TestUtils.dartDir.toNativePath()}/tools/testing/bin'; |
228 return '$jsshellDir/$executable'; | 228 return '$jsshellDir/$executable'; |
229 } | 229 } |
230 | 230 |
231 /** | 231 /** |
232 * The file extension (if any) that should be added to the given executable | 232 * The file extension (if any) that should be added to the given executable |
233 * name for the current platform. | 233 * name for the current platform. |
234 */ | 234 */ |
235 // TODO(ahe): Get rid of this. Use executableBinarySuffix instead. | 235 // TODO(ahe): Get rid of this. Use executableBinarySuffix instead. |
236 String getExecutableSuffix(String executable) { | 236 String getExecutableSuffix(String executable) { |
237 if (Platform.operatingSystem == 'windows') { | 237 if (Platform.operatingSystem == 'windows') { |
(...skipping 2182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2420 for (var key in PATH_REPLACEMENTS.keys) { | 2420 for (var key in PATH_REPLACEMENTS.keys) { |
2421 if (path.startsWith(key)) { | 2421 if (path.startsWith(key)) { |
2422 path = path.replaceFirst(key, PATH_REPLACEMENTS[key]); | 2422 path = path.replaceFirst(key, PATH_REPLACEMENTS[key]); |
2423 break; | 2423 break; |
2424 } | 2424 } |
2425 } | 2425 } |
2426 } | 2426 } |
2427 return path; | 2427 return path; |
2428 } | 2428 } |
2429 } | 2429 } |
OLD | NEW |