Use the named configuration in test.dart, if it is present
This switches the test scripts over to using the test options
gotten from the -n [configuration_name] option instead of those
options given on the command line. Command line options that
are part of the named configuration class will be taken from
that object.
Change-Id: I19b29c144a5b1546a75d560c1136a6f06306a01b
Reviewed-on: https://dart-review.googlesource.com/69941
Reviewed-by: Alexander Thomas <athom@google.com>
diff --git a/tools/testing/dart/configuration.dart b/tools/testing/dart/configuration.dart
index 9d5149e..433d1d7 100644
--- a/tools/testing/dart/configuration.dart
+++ b/tools/testing/dart/configuration.dart
@@ -23,7 +23,6 @@
class TestConfiguration {
TestConfiguration(
{this.configuration,
- this.namedConfiguration,
this.progress,
this.selectors,
this.appendLogs,
@@ -71,12 +70,9 @@
final Map<String, RegExp> selectors;
final Progress progress;
- // The test configuration computed from the test options.
+ // The test configuration read from the -n option and the test matrix
+ // or else computed from the test options.
final Configuration configuration;
- // The test configuration coming from the -n option. Merging
- // these two configurations into one will be the focus of some
- // usability work.
- final Configuration namedConfiguration;
// Boolean flags.
diff --git a/tools/testing/dart/options.dart b/tools/testing/dart/options.dart
index 13ca755..dd3896f 100644
--- a/tools/testing/dart/options.dart
+++ b/tools/testing/dart/options.dart
@@ -633,32 +633,27 @@
var system = System.find(data["system"] as String);
var namedConfiguration =
getNamedConfiguration(data["named_configuration"] as String);
- var innerConfiguration = new Configuration(
- namedConfiguration?.name ?? "custom configuration",
- architecture,
- compiler,
- mode,
- runtime,
- system,
- timeout: data["timeout"] as int,
- enableAsserts: data["enable_asserts"] as bool,
- useBlobs: data["use_blobs"] as bool,
- useSdk: data["use_sdk"] as bool,
- useFastStartup: data["fast_startup"] as bool,
- useDart2JSWithKernel: data["dart2js_with_kernel"] as bool,
- useDart2JSOldFrontEnd: data["dart2js_old_frontend"] as bool,
- useHotReload: data["hot_reload"] as bool,
- useHotReloadRollback: data["hot_reload_rollback"] as bool,
- isChecked: data["checked"] as bool,
- isHostChecked: data["host_checked"] as bool,
- isCsp: data["csp"] as bool,
- isMinified: data["minified"] as bool,
- vmOptions: vmOptions,
- builderTag: data["builder_tag"] as String,
- previewDart2: !(data["no_preview_dart_2"] as bool));
+ var innerConfiguration = namedConfiguration ??
+ new Configuration("custom configuration", architecture,
+ compiler, mode, runtime, system,
+ timeout: data["timeout"] as int,
+ enableAsserts: data["enable_asserts"] as bool,
+ useBlobs: data["use_blobs"] as bool,
+ useSdk: data["use_sdk"] as bool,
+ useFastStartup: data["fast_startup"] as bool,
+ useDart2JSWithKernel: data["dart2js_with_kernel"] as bool,
+ useDart2JSOldFrontEnd: data["dart2js_old_frontend"] as bool,
+ useHotReload: data["hot_reload"] as bool,
+ useHotReloadRollback: data["hot_reload_rollback"] as bool,
+ isChecked: data["checked"] as bool,
+ isHostChecked: data["host_checked"] as bool,
+ isCsp: data["csp"] as bool,
+ isMinified: data["minified"] as bool,
+ vmOptions: vmOptions,
+ builderTag: data["builder_tag"] as String,
+ previewDart2: !(data["no_preview_dart_2"] as bool));
var configuration = new TestConfiguration(
configuration: innerConfiguration,
- namedConfiguration: namedConfiguration,
progress: Progress.find(data["progress"] as String),
selectors: selectors,
appendLogs: data["append_logs"] as bool,
diff --git a/tools/testing/dart/test_configurations.dart b/tools/testing/dart/test_configurations.dart
index 7e36576..e21cf48 100644
--- a/tools/testing/dart/test_configurations.dart
+++ b/tools/testing/dart/test_configurations.dart
@@ -85,26 +85,13 @@
// Print the configurations being run by this execution of
// test.dart. However, don't do it if the silent progress indicator
- // is used. This is only needed because of the junit tests.
+ // is used.
if (progressIndicator != Progress.silent) {
- var outputWords = configurations.length > 1
- ? ['Test configurations:']
- : ['Test configuration:'];
-
+ print('Test configuration${configurations.length > 1 ? 's' : ''}:');
for (var configuration in configurations) {
- var settings = [
- configuration.compiler.name,
- configuration.runtime.name,
- configuration.mode.name,
- configuration.architecture.name
- ];
- if (configuration.isChecked) settings.add('checked');
- if (configuration.noPreviewDart2) settings.add('no-preview-dart-2');
- if (configuration.useFastStartup) settings.add('fast-startup');
- if (configuration.useEnableAsserts) settings.add('enable-asserts');
- outputWords.add(settings.join('_'));
+ print(" ${configuration.configuration}");
+ print("Suites tested: ${configuration.selectors.keys.join(", ")}");
}
- print(outputWords.join(' '));
}
var runningBrowserTests =