| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 String getPlatformOutDir() { |
| 6 var os = new Platform().operatingSystem(); |
| 7 if (os == 'linux') return 'out'; |
| 8 if (os == 'macos') 'xcodebuild'; |
| 9 return ''; // Windows. |
| 10 } |
| 11 |
| 5 String getProcessTestFileName() { | 12 String getProcessTestFileName() { |
| 6 var os = new Platform().operatingSystem(); | 13 var outDir = getPlatformOutDir(); |
| 7 | |
| 8 var outDir = ''; | |
| 9 if (os == 'linux') { | |
| 10 outDir = 'out'; | |
| 11 } else if (os == 'macos') { | |
| 12 outDir = 'xcodebuild'; | |
| 13 } | |
| 14 | |
| 15 var names = ['$outDir/Release_ia32/process_test', | 14 var names = ['$outDir/Release_ia32/process_test', |
| 16 '$outDir/Debug_ia32/process_test']; | 15 '$outDir/Debug_ia32/process_test']; |
| 17 | 16 |
| 18 for (var name in names) { | 17 for (var name in names) { |
| 19 if (new File(name).existsSync()) { | 18 if (new File(name).existsSync()) { |
| 20 return name; | 19 return name; |
| 21 } | 20 } |
| 22 } | 21 } |
| 22 Expect.fail('Could not find the process_test executable.'); |
| 23 } |
| 23 | 24 |
| 24 Expect.fail('Could not find the process_test program.'); | 25 String getDartFileName() { |
| 26 var outDir = getPlatformOutDir(); |
| 27 var names = ['$outDir/Release_ia32/dart', |
| 28 '$outDir/Debug_ia32/dart']; |
| 29 |
| 30 for (var name in names) { |
| 31 if (new File(name).existsSync()) { |
| 32 return name; |
| 33 } |
| 34 } |
| 35 Expect.fail('Could not find the dart executable.'); |
| 25 } | 36 } |
| OLD | NEW |