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 2284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2295 static Path absolutePath(Path path) { | 2295 static Path absolutePath(Path path) { |
2296 if (!path.isAbsolute) { | 2296 if (!path.isAbsolute) { |
2297 return currentWorkingDirectory.join(path); | 2297 return currentWorkingDirectory.join(path); |
2298 } | 2298 } |
2299 return path; | 2299 return path; |
2300 } | 2300 } |
2301 | 2301 |
2302 static String outputDir(Map configuration) { | 2302 static String outputDir(Map configuration) { |
2303 var result = ''; | 2303 var result = ''; |
2304 var system = configuration['system']; | 2304 var system = configuration['system']; |
2305 if (system == 'linux' || system == 'android' || system == 'windows') { | 2305 if (system == 'fuchsia' || |
| 2306 system == 'linux' || |
| 2307 system == 'android' || |
| 2308 system == 'windows') { |
2306 result = 'out/'; | 2309 result = 'out/'; |
2307 } else if (system == 'macos') { | 2310 } else if (system == 'macos') { |
2308 result = 'xcodebuild/'; | 2311 result = 'xcodebuild/'; |
2309 } else { | 2312 } else { |
2310 throw new Exception('Unknown operating system: "$system"'); | 2313 throw new Exception('Unknown operating system: "$system"'); |
2311 } | 2314 } |
2312 return result; | 2315 return result; |
2313 } | 2316 } |
2314 | 2317 |
2315 static List<String> standardOptions(Map configuration) { | 2318 static List<String> standardOptions(Map configuration) { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2405 mode = 'Product'; | 2408 mode = 'Product'; |
2406 break; | 2409 break; |
2407 default: | 2410 default: |
2408 throw 'Unrecognized mode configuration: ${configuration['mode']}'; | 2411 throw 'Unrecognized mode configuration: ${configuration['mode']}'; |
2409 } | 2412 } |
2410 var os; | 2413 var os; |
2411 switch (configuration['system']) { | 2414 switch (configuration['system']) { |
2412 case 'android': | 2415 case 'android': |
2413 os = 'Android'; | 2416 os = 'Android'; |
2414 break; | 2417 break; |
| 2418 case 'fuchsia': |
2415 case 'linux': | 2419 case 'linux': |
2416 case 'macos': | 2420 case 'macos': |
2417 case 'windows': | 2421 case 'windows': |
2418 os = ''; | 2422 os = ''; |
2419 break; | 2423 break; |
2420 default: | 2424 default: |
2421 throw 'Unrecognized operating system: ${configuration['system']}'; | 2425 throw 'Unrecognized operating system: ${configuration['system']}'; |
2422 } | 2426 } |
2423 var arch = configuration['arch'].toUpperCase(); | 2427 var arch = configuration['arch'].toUpperCase(); |
2424 var normal = '$mode$os$arch'; | 2428 var normal = '$mode$os$arch'; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2530 } | 2534 } |
2531 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) { | 2535 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) { |
2532 ++shortNameCounter; | 2536 ++shortNameCounter; |
2533 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH); | 2537 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH); |
2534 path = "short${shortNameCounter}_$pathEnd"; | 2538 path = "short${shortNameCounter}_$pathEnd"; |
2535 } | 2539 } |
2536 } | 2540 } |
2537 return path; | 2541 return path; |
2538 } | 2542 } |
2539 } | 2543 } |
OLD | NEW |