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

Unified Diff: utils/testrunner/configuration.dart

Issue 10897016: Testrunner for 3rd parties. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « pkg/unittest/unittest.dart ('k') | utils/testrunner/dart2js_task.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/testrunner/configuration.dart
===================================================================
--- utils/testrunner/configuration.dart (revision 0)
+++ utils/testrunner/configuration.dart (revision 0)
@@ -0,0 +1,94 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/**
+ * The command line and other arguments passed to the test runner are
+ * gathered into a global [Configuration] instance that controls the
+ * execution. For details on the various options here see
+ * [getOptionParser].
+ */
+class Configuration {
+ final String unittestPath;
+ final bool runInBrowser;
+ final bool runIsolated;
+ final bool verbose;
+ final bool immediateOutput;
+ final bool produceSummary;
+ final bool includeTime;
+ final bool listFiles;
+ final bool listTests;
+ final bool listGroups;
+ final String listFormat;
+ final String passFormat;
+ final String failFormat;
+ final String errorFormat;
+ final List includeFilter;
+ final List excludeFilter;
+ final int timeout;
+ final String runtime;
+ final bool checkedMode;
+ final bool keepTests;
+ final bool stopOnFailure;
+ final int maxTasks;
+ final String outputStream;
+ final String logStream;
+ final String tempDir;
+ String dart2jsPath;
+ String drtPath;
+ String dartPath;
+ bool filtering;
+
+ Configuration(ArgParser parser, ArgResults options) :
+ unittestPath = makePathAbsolute(options['unittest']),
+ runIsolated = options['isolate'],
+ runInBrowser = (options['runtime'] != 'vm'),
+ verbose = (options['log'] != 'none' && !options['list-groups']),
+ immediateOutput = options['immediate'],
+ produceSummary = options['summary'],
+ includeTime = options['time'],
+ listFiles = options['list-files'],
+ listTests = options['list-tests'],
+ listGroups = options['list-groups'],
+ listFormat = options['list-format'],
+ passFormat = options['pass-format'],
+ failFormat = options['fail-format'],
+ errorFormat = options['error-format'],
+ includeFilter = options['include'],
+ excludeFilter = options['exclude'],
+ timeout = parseInt(options['timeout']),
+ runtime = options['runtime'],
+ checkedMode = options['checked'],
+ keepTests = (options['keep-files'] &&
+ !(options['list-groups'] || options['list-tests'])),
+ stopOnFailure = options['stop-on-failure'],
+ maxTasks = parseInt(options['tasks']),
+ outputStream = options['out'],
+ logStream = options['log'],
+ tempDir = options['tempdir'] {
+ filtering = (includeFilter.length > 0 || excludeFilter.length > 0);
+ var dartsdk = options['dartsdk'];
+ var pathSep = Platform.pathSeparator;
+
+ if (dartsdk == null ||
+ parser.getDefault('dart2js') != options['dart2js']) {
+ dart2jsPath = options['dart2js'];
+ } else {
+ dart2jsPath = '$dartsdk${pathSep}dart-sdk${pathSep}bin${pathSep}dart2js';
+ }
+
+ if (dartsdk == null ||
+ parser.getDefault('dart') != options['dart']) {
+ dartPath = options['dart'];
+ } else {
+ dartPath = '$dartsdk${pathSep}dart-sdk${pathSep}bin${pathSep}dart';
+ }
+
+ if (dartsdk == null ||
+ parser.getDefault('drt') != options['drt']) {
+ drtPath = options['drt'];
+ } else {
+ drtPath = '$dartsdk${pathSep}chromium${pathSep}DumpRenderTree';
+ }
+ }
+}
« no previous file with comments | « pkg/unittest/unittest.dart ('k') | utils/testrunner/dart2js_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698