| Index: tools/testing/dart/test_runner.dart
|
| diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
|
| index 9dd56f6e8a9c9759a158cded206be429817ba7d0..f94515d00fdf702d342f0cf41cd70b595d96084d 100644
|
| --- a/tools/testing/dart/test_runner.dart
|
| +++ b/tools/testing/dart/test_runner.dart
|
| @@ -17,19 +17,34 @@
|
|
|
| final int NO_TIMEOUT = 0;
|
|
|
| -String getDartShellFileName() {
|
| - var names = ["out/Debug_ia32/dart_bin",
|
| - "out/Release_ia32/dart_bin",
|
| - "xcodebuild/Debug_ia32/dart_bin",
|
| - "xcodebuild/Release_ia32/dart_bin",
|
| - "Debug_ia32/dart_bin.exe",
|
| - "Release_ia32/dart_bin.exe"];
|
| - for (var name in names) {
|
| - if (new File(name).existsSync()) {
|
| - return name;
|
| - }
|
| +
|
| +String getBuildDir(Map configuration) {
|
| + var buildDir = '';
|
| + var os = configuration['os'];
|
| + if (os == 'linux') {
|
| + buildDir = 'out/';
|
| + } else if (os == 'macos') {
|
| + buildDir = 'xcodebuild/';
|
| }
|
| - Expect.fail("Cound not find the Dart shell executable.");
|
| + buildDir += (configuration['mode'] == 'debug') ? 'Debug_' : 'Release_';
|
| + buildDir += configuration['architecture'] + '/';
|
| + return buildDir;
|
| +}
|
| +
|
| +
|
| +String getExecutableName(Map configuration) {
|
| + if (configuration['component'] == 'vm') {
|
| + return 'dart_bin';
|
| + } else if (configuration['component'] == 'dartc') {
|
| + return 'dartc';
|
| + } else {
|
| + throw "Unknown executable for: ${configuration['component']}";
|
| + }
|
| +}
|
| +
|
| +
|
| +String getDartShellFileName(Map configuration) {
|
| + return getBuildDir(configuration) + getExecutableName(configuration);
|
| }
|
|
|
|
|
|
|