Chromium Code Reviews| Index: tests/standalone/src/ProcessTestUtil.dart |
| diff --git a/tests/standalone/src/ProcessTestUtil.dart b/tests/standalone/src/ProcessTestUtil.dart |
| index 4a465eb170670e24195556cb6772b0c797aef996..971fbb9d038eacbb53d3a989deca8267ae55e992 100644 |
| --- a/tests/standalone/src/ProcessTestUtil.dart |
| +++ b/tests/standalone/src/ProcessTestUtil.dart |
| @@ -2,16 +2,15 @@ |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| -String getProcessTestFileName() { |
| +String getPlatformOutDir() { |
| var os = new Platform().operatingSystem(); |
| + if (os == 'linux') return 'out'; |
| + if (os == 'macos') 'xcodebuild'; |
| + return ''; // Windows. |
| +} |
| - var outDir = ''; |
| - if (os == 'linux') { |
| - outDir = 'out'; |
| - } else if (os == 'macos') { |
| - outDir = 'xcodebuild'; |
| - } |
| - |
| +String getProcessTestFileName() { |
| + var outDir = getPlatformOutDir(); |
| var names = ['$outDir/Release_ia32/process_test', |
| '$outDir/Debug_ia32/process_test']; |
| @@ -20,6 +19,18 @@ String getProcessTestFileName() { |
| return name; |
| } |
| } |
| + Expect.fail('Could not find the process_test executable.'); |
| +} |
| - Expect.fail('Could not find the process_test program.'); |
| +String getDartFileName() { |
|
Mads Ager (google)
2011/11/23 12:45:19
I think this code is in TestRunnerTest as well. Co
Søren Gjesse
2011/11/23 14:50:18
Done.
|
| + var outDir = getPlatformOutDir(); |
| + var names = ['$outDir/Release_ia32/dart', |
| + '$outDir/Debug_ia32/dart']; |
| + |
| + for (var name in names) { |
| + if (new File(name).existsSync()) { |
| + return name; |
| + } |
| + } |
| + Expect.fail('Could not find the dart executable.'); |
| } |