| Index: tools/testing/dart/test_suite.dart
|
| diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
|
| index bf79c8ecec44b218e64e142bceba95f024e7e86b..3e03fa137f1ef155e48637938fa21916d1a83d77 100644
|
| --- a/tools/testing/dart/test_suite.dart
|
| +++ b/tools/testing/dart/test_suite.dart
|
| @@ -131,9 +131,11 @@ abstract class TestSuite {
|
| Map<String, String> _environmentOverrides;
|
|
|
| TestSuite(this.configuration, this.suiteName) {
|
| - _environmentOverrides = {
|
| + if (configuration['build_directory'] == '') {
|
| + _environmentOverrides = {
|
| 'DART_CONFIGURATION' : TestUtils.configurationDir(configuration)
|
| - };
|
| + };
|
| + }
|
| }
|
|
|
| Map<String, String> get environmentOverrides => _environmentOverrides;
|
| @@ -2265,11 +2267,22 @@ class TestUtils {
|
| return "${outputDir(configuration)}${configurationDir(configuration)}";
|
| }
|
|
|
| - static getValidOutputDir(Map configuration, String mode, String arch) {
|
| + 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';
|
| var cross = '${mode}X$arch';
|
| var outDir = outputDir(configuration);
|
| @@ -2285,20 +2298,6 @@ class TestUtils {
|
| return normal;
|
| }
|
|
|
| - static String configurationDir(Map configuration) {
|
| - // For regular dart checkouts, the configDir by default is mode+arch.
|
| - // For Dartium, the configDir by default is mode (as defined by the Chrome
|
| - // build setup). We can detect this because in the dartium checkout, the
|
| - // "output" directory is a sibling of the dart directory instead of a child.
|
| - var mode = (configuration['mode'] == 'debug') ? 'Debug' : 'Release';
|
| - var arch = configuration['arch'].toUpperCase();
|
| - if (currentWorkingDirectory != dartDir) {
|
| - return getValidOutputDir(configuration, mode, arch);
|
| - } else {
|
| - return mode;
|
| - }
|
| - }
|
| -
|
| /**
|
| * Returns the path to the dart binary checked into the repo, used for
|
| * bootstrapping test.dart.
|
|
|