OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library test.runner.configuration; | 5 library test.runner.configuration; |
6 | 6 |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 import 'dart:math' as math; | 8 import 'dart:math' as math; |
9 | 9 |
10 import 'package:args/args.dart'; | 10 import 'package:args/args.dart'; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 allowed: allPlatforms.map((platform) => platform.identifier).toList(), | 49 allowed: allPlatforms.map((platform) => platform.identifier).toList(), |
50 defaultsTo: 'vm', | 50 defaultsTo: 'vm', |
51 allowMultiple: true); | 51 allowMultiple: true); |
52 parser.addOption("concurrency", | 52 parser.addOption("concurrency", |
53 abbr: 'j', | 53 abbr: 'j', |
54 help: 'The number of concurrent test suites run.\n' | 54 help: 'The number of concurrent test suites run.\n' |
55 '(defaults to $_defaultConcurrency)', | 55 '(defaults to $_defaultConcurrency)', |
56 valueHelp: 'threads'); | 56 valueHelp: 'threads'); |
57 parser.addOption("pub-serve", | 57 parser.addOption("pub-serve", |
58 help: 'The port of a pub serve instance serving "test/".', | 58 help: 'The port of a pub serve instance serving "test/".', |
59 hide: !supportsPubServe, | |
60 valueHelp: 'port'); | 59 valueHelp: 'port'); |
61 parser.addFlag("pause-after-load", | 60 parser.addFlag("pause-after-load", |
62 help: 'Pauses for debugging before any tests execute.\n' | 61 help: 'Pauses for debugging before any tests execute.\n' |
63 'Implies --concurrency=1.\n' | 62 'Implies --concurrency=1.\n' |
64 'Currently only supported for browser tests.', | 63 'Currently only supported for browser tests.', |
65 negatable: false); | 64 negatable: false); |
66 parser.addOption("reporter", | 65 parser.addOption("reporter", |
67 abbr: 'r', | 66 abbr: 'r', |
68 help: 'The runner used to print test results.', | 67 help: 'The runner used to print test results.', |
69 allowed: ['compact', 'expanded'], | 68 allowed: ['compact', 'expanded'], |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 pubServeUrl = pubServePort == null | 201 pubServeUrl = pubServePort == null |
203 ? null | 202 ? null |
204 : Uri.parse("http://localhost:$pubServePort"), | 203 : Uri.parse("http://localhost:$pubServePort"), |
205 concurrency = pauseAfterLoad | 204 concurrency = pauseAfterLoad |
206 ? 1 | 205 ? 1 |
207 : (concurrency == null ? _defaultConcurrency : concurrency), | 206 : (concurrency == null ? _defaultConcurrency : concurrency), |
208 platforms = platforms == null ? [TestPlatform.vm] : platforms.toList(), | 207 platforms = platforms == null ? [TestPlatform.vm] : platforms.toList(), |
209 paths = paths == null ? ["test"] : paths.toList(), | 208 paths = paths == null ? ["test"] : paths.toList(), |
210 explicitPaths = paths != null; | 209 explicitPaths = paths != null; |
211 } | 210 } |
OLD | NEW |