OLD | NEW |
---|---|
(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 class Configuration { | |
Siggi Cherem (dart-lang)
2012/08/29 20:47:35
+dartdoc
gram
2012/08/30 00:16:55
Done.
| |
6 final String unittestPath; | |
7 final bool runInBrowser; | |
8 final bool runIsolated; | |
9 final bool verbose; | |
10 final bool immediateOutput; | |
11 final bool produceSummary; | |
12 final bool includeTime; | |
13 final bool listFiles; | |
14 final bool listTests; | |
15 final bool listGroups; | |
16 final String listFormat; | |
17 final String passFormat; | |
18 final String failFormat; | |
19 final String errorFormat; | |
20 final List includeFilter; | |
21 final List excludeFilter; | |
22 final int timeout; | |
23 final String runtime; | |
24 final bool checkedMode; | |
25 final bool keepTests; | |
26 final bool stopOnFailure; | |
27 final int maxTasks; | |
28 final String outputStream; | |
29 final String logStream; | |
30 final String tempDir; | |
31 String dart2jsPath; | |
32 String drtPath; | |
33 String dartPath; | |
34 bool filtering; | |
35 | |
36 | |
37 Configuration(ArgParser parser, ArgResults options) : | |
38 unittestPath = makePathAbsolute(options['unittest']), | |
39 runIsolated = options['isolate'], | |
40 runInBrowser = (options['runtime'] != 'vm'), | |
41 verbose = (options['log'] != 'none' && !options['list-groups']), | |
42 immediateOutput = options['immediate'], | |
43 produceSummary = options['summary'], | |
44 includeTime = options['time'], | |
45 listFiles = options['list-files'], | |
46 listTests = options['list-tests'], | |
47 listGroups = options['list-groups'], | |
48 listFormat = options['list-format'], | |
49 passFormat = options['pass-format'], | |
50 failFormat = options['fail-format'], | |
51 errorFormat = options['error-format'], | |
52 includeFilter = options['include'], | |
53 excludeFilter = options['exclude'], | |
54 timeout = parseInt(options['timeout']), | |
55 runtime = options['runtime'], | |
56 checkedMode = options['checked'], | |
57 keepTests = (options['keep-generated-tests'] && | |
58 !(options['list-groups'] || options['list-tests'])), | |
59 stopOnFailure = options['stop-on-failure'], | |
60 maxTasks = parseInt(options['tasks']), | |
61 outputStream = options['out'], | |
62 logStream = options['log'], | |
63 tempDir = options['tempdir'] { | |
64 filtering = (includeFilter.length > 0 || excludeFilter.length > 0); | |
65 var dartsdk = options['dartsdk']; | |
66 var pathSep = Platform.pathSeparator; | |
67 | |
68 if (dartsdk == null || | |
69 parser.getDefault('dart2js') != options['dart2js']) { | |
70 dart2jsPath = options['dart2js']; | |
71 } else { | |
72 dart2jsPath = '$dartsdk${pathSep}dart-sdk${pathSep}bin${pathSep}dart2js'; | |
73 } | |
74 | |
75 if (dartsdk == null || | |
76 parser.getDefault('dart') != options['dart']) { | |
77 dartPath = options['dart']; | |
78 } else { | |
79 dartPath = '$dartsdk${pathSep}dart-sdk${pathSep}bin${pathSep}dart'; | |
80 } | |
81 | |
82 if (dartsdk == null || | |
83 parser.getDefault('drt') != options['drt']) { | |
84 drtPath = options['drt']; | |
85 } else { | |
86 drtPath = '$dartsdk${pathSep}chromium${pathSep}DumpRenderTree'; | |
87 } | |
88 } | |
89 } | |
OLD | NEW |