| 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 @TestOn("vm") | 5 @TestOn("vm") |
| 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:path/path.dart' as p; | 10 import 'package:path/path.dart' as p; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 test("failure", () => throw new TestFailure("oh no")); | 35 test("failure", () => throw new TestFailure("oh no")); |
| 36 } | 36 } |
| 37 """; | 37 """; |
| 38 | 38 |
| 39 final _defaultConcurrency = math.max(1, Platform.numberOfProcessors ~/ 2); | 39 final _defaultConcurrency = math.max(1, Platform.numberOfProcessors ~/ 2); |
| 40 | 40 |
| 41 final _usage = """ | 41 final _usage = """ |
| 42 Usage: pub run test:test [files or directories...] | 42 Usage: pub run test:test [files or directories...] |
| 43 | 43 |
| 44 -h, --help Shows this usage information. | 44 -h, --help Shows this usage information. |
| 45 --version Shows the package's version. |
| 45 -n, --name A substring of the name of the test to run. | 46 -n, --name A substring of the name of the test to run. |
| 46 Regular expression syntax is supported. | 47 Regular expression syntax is supported. |
| 47 | 48 |
| 48 -N, --plain-name A plain-text substring of the name of the test to
run. | 49 -N, --plain-name A plain-text substring of the name of the test to
run. |
| 49 -p, --platform The platform(s) on which to run the tests. | 50 -p, --platform The platform(s) on which to run the tests. |
| 50 [vm (default), dartium, content-shell, chrome, ph
antomjs, firefox] | 51 [vm (default), dartium, content-shell, chrome, ph
antomjs, firefox] |
| 51 | 52 |
| 52 -j, --concurrency=<threads> The number of concurrent test suites run. | 53 -j, --concurrency=<threads> The number of concurrent test suites run. |
| 53 (defaults to $_defaultConcurrency) | 54 (defaults to $_defaultConcurrency) |
| 54 | 55 |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 }); | 440 }); |
| 440 }); | 441 }); |
| 441 }); | 442 }); |
| 442 } | 443 } |
| 443 | 444 |
| 444 ProcessResult _runUnittest(List<String> args) => | 445 ProcessResult _runUnittest(List<String> args) => |
| 445 runUnittest(args, workingDirectory: _sandbox); | 446 runUnittest(args, workingDirectory: _sandbox); |
| 446 | 447 |
| 447 ProcessResult _runDart(List<String> args) => | 448 ProcessResult _runDart(List<String> args) => |
| 448 runDart(args, workingDirectory: _sandbox); | 449 runDart(args, workingDirectory: _sandbox); |
| OLD | NEW |