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

Side by Side Diff: utils/testrunner/configuration.dart

Issue 10977069: New testrunner that runs the test pipleine in an isolate. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 /**
6 * The command line and other arguments passed to the test runner are
7 * gathered into a global [Configuration] instance that controls the
8 * execution. For details on the various options here see
9 * [getOptionParser].
10 */
11 class Configuration {
12 final String unittestPath;
13 final bool runInBrowser;
14 final bool runIsolated;
15 final bool verbose;
16 final bool immediateOutput;
17 final bool layoutText;
18 final bool layoutPixel;
19 final bool produceSummary;
20 final bool includeTime;
21 final bool listFiles;
22 final bool listTests;
23 final bool listGroups;
24 final String listFormat;
25 final String passFormat;
26 final String failFormat;
27 final String errorFormat;
28 final List includeFilter;
29 final List excludeFilter;
30 final int timeout;
31 final String runtime;
32 final bool checkedMode;
33 final bool keepTests;
34 final bool stopOnFailure;
35 final int maxTasks;
36 final String outputStream;
37 final String logStream;
38 final String tempDir;
39 final bool regenerate;
40 String dart2jsPath;
41 String drtPath;
42 String dartPath;
43 bool filtering;
44 bool runServer;
45 String port;
46 String staticRoot;
47
48 Configuration(ArgParser parser, ArgResults options) :
49 unittestPath = makePathAbsolute(options['unittest']),
50 runIsolated = options['isolate'],
51 runInBrowser = (options['runtime'] != 'vm'),
52 verbose = (options['log'] != 'none' && !options['list-groups']),
53 immediateOutput = options['immediate'],
54 layoutText = options['layout-text'],
55 layoutPixel = options['layout-pixel'],
56 produceSummary = options['summary'],
57 includeTime = options['time'],
58 listFiles = options['list-files'],
59 listTests = options['list-tests'],
60 listGroups = options['list-groups'],
61 listFormat = options['list-format'],
62 passFormat = options['pass-format'],
63 failFormat = options['fail-format'],
64 errorFormat = options['error-format'],
65 includeFilter = options['include'],
66 excludeFilter = options['exclude'],
67 timeout = int.parse(options['timeout']),
68 runtime = options['runtime'],
69 checkedMode = options['checked'],
70 keepTests = (options['keep-files'] &&
71 !(options['list-groups'] || options['list-tests'])),
72 stopOnFailure = options['stop-on-failure'],
73 maxTasks = int.parse(options['tasks']),
74 outputStream = options['out'],
75 logStream = options['log'],
76 tempDir = options['tempdir'],
77 regenerate = options['regenerate'],
78 runServer = options['server'],
79 port = options['port'],
80 staticRoot = options['root'] {
81 filtering = (includeFilter.length > 0 || excludeFilter.length > 0);
82 var dartsdk = options['dartsdk'];
83 var pathSep = Platform.pathSeparator;
84
85 if (dartsdk == null ||
86 parser.getDefault('dart2js') != options['dart2js']) {
87 dart2jsPath = options['dart2js'];
88 } else {
89 dart2jsPath = '$dartsdk${pathSep}dart-sdk${pathSep}bin${pathSep}dart2js';
90 }
91
92 if (dartsdk == null ||
93 parser.getDefault('dart') != options['dart']) {
94 dartPath = options['dart'];
95 } else {
96 dartPath = '$dartsdk${pathSep}dart-sdk${pathSep}bin${pathSep}dart';
97 }
98
99 if (dartsdk == null ||
100 parser.getDefault('drt') != options['drt']) {
101 drtPath = options['drt'];
102 } else {
103 drtPath = '$dartsdk${pathSep}chromium${pathSep}DumpRenderTree';
104 }
105 }
106 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698