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

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

Issue 877403003: Cache a computed directory in test_suite.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: balance all the parentheses Created 5 years, 11 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_suite.dart
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 3e03fa137f1ef155e48637938fa21916d1a83d77..b29c3f0130e55a515e1cd325aae668d5470c4bdf 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -131,9 +131,10 @@ abstract class TestSuite {
Map<String, String> _environmentOverrides;
TestSuite(this.configuration, this.suiteName) {
- if (configuration['build_directory'] == '') {
+ TestUtils.buildDir(configuration); // Sets configuration_directory.
+ if (configuration['configuration_directory'] != null) {
_environmentOverrides = {
- 'DART_CONFIGURATION' : TestUtils.configurationDir(configuration)
+ 'DART_CONFIGURATION' : configuration['configuration_directory']
};
}
}
@@ -2260,27 +2261,24 @@ class TestUtils {
// is relative to the current working directory.
// Thus, if we pass in an absolute path (e.g. '--build-directory=/tmp/out')
// we get into trouble.
- if (configuration['build_directory'] != '') {
- return configuration['build_directory'];
+ if (configuration['build_directory'] == '') {
+ configuration['configuration_directory'] =
+ configurationDir(configuration);
+ configuration['build_directory'] =
+ outputDir(configuration) + configuration['configuration_directory'];
}
-
- return "${outputDir(configuration)}${configurationDir(configuration)}";
+ return configuration['build_directory'];
}
static String configurationDir(Map configuration) {
// This returns the correct configuration directory (the last component
// of the output directory path) for regular dart checkouts.
- // Do not call this function if the --build-directory option is used.
// Dartium checkouts use the --build-directory option to pass in the
// correct build directory explicitly.
// We allow our code to have been cross compiled, i.e., that there
// is an X in front of the arch. We don't allow both a cross compiled
// and a normal version to be present (except if you specifically pass
// in the build_directory).
- if (configuration['build_directory'] != '') {
- throw "Internal test.dart error: Don't call TestUtils.configurationDir "
- "if the --build-directory option is used.";
- }
var mode = (configuration['mode'] == 'debug') ? 'Debug' : 'Release';
var arch = configuration['arch'].toUpperCase();
var normal = '$mode$arch';
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698