Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Unified Diff: tools/testing/dart/test_runner.dart

Issue 8540002: Use the configuration for determining the binary to use for testing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/testing/dart/status_expression.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « tools/testing/dart/status_expression.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698