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

Unified Diff: lib/src/runner/configuration.dart

Issue 1264393004: Pass Configuration to Loader and Server. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 4 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 | « lib/src/runner/browser/server.dart ('k') | lib/src/runner/loader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/configuration.dart
diff --git a/lib/src/runner/configuration.dart b/lib/src/runner/configuration.dart
index 776c2fc11b58d50e5588a33f35bcee2dc0f19317..0ae1f3da542e7021bf591c6d2bd0ceb5846afa35 100644
--- a/lib/src/runner/configuration.dart
+++ b/lib/src/runner/configuration.dart
@@ -11,6 +11,7 @@ import 'package:args/args.dart';
import 'package:path/path.dart' as p;
import '../frontend/timeout.dart';
+import '../backend/metadata.dart';
import '../backend/test_platform.dart';
import '../util/io.dart';
@@ -130,6 +131,12 @@ class Configuration {
/// The set of platforms on which to run tests.
final List<TestPlatform> platforms;
+ /// The global test metadata derived from this configuration.
+ Metadata get metadata =>
+ new Metadata(
+ timeout: pauseAfterLoad ? Timeout.none : null,
+ verboseTrace: verboseTrace);
+
/// Parses the configuration from [args].
///
/// Throws a [FormatException] if [args] are invalid.
@@ -162,7 +169,7 @@ class Configuration {
concurrency: _wrapFormatException(options, 'concurrency', int.parse,
orElse: () => _defaultConcurrency),
pattern: pattern,
- platforms: options['platforms'].map(TestPlatform.find).toList(),
+ platforms: options['platform'].map(TestPlatform.find),
paths: options.rest.isEmpty ? null : options.rest);
}
@@ -198,7 +205,7 @@ class Configuration {
concurrency = pauseAfterLoad
? 1
: (concurrency == null ? _defaultConcurrency : concurrency),
- platforms = platforms.toList(),
+ platforms = platforms == null ? [TestPlatform.vm] : platforms.toList(),
paths = paths == null ? ["test"] : paths.toList(),
explicitPaths = paths != null;
}
« no previous file with comments | « lib/src/runner/browser/server.dart ('k') | lib/src/runner/loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698