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

Side by Side Diff: lib/src/executable.dart

Issue 1049903002: Move the executable's implementation into lib. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « bin/test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.test; 5 // TODO(nweiz): This is under lib so that it can be used by the unittest dummy
6 // package. Once that package is no longer being updated, move this back into
7 // bin.
8 library test.executable;
6 9
7 import 'dart:async'; 10 import 'dart:async';
8 import 'dart:io'; 11 import 'dart:io';
9 import 'dart:isolate'; 12 import 'dart:isolate';
10 13
11 import 'package:args/args.dart'; 14 import 'package:args/args.dart';
12 import 'package:stack_trace/stack_trace.dart'; 15 import 'package:stack_trace/stack_trace.dart';
13 16
14 import 'package:test/src/backend/test_platform.dart'; 17 import 'backend/test_platform.dart';
15 import 'package:test/src/runner/reporter/compact.dart'; 18 import 'runner/reporter/compact.dart';
16 import 'package:test/src/runner/load_exception.dart'; 19 import 'runner/load_exception.dart';
17 import 'package:test/src/runner/loader.dart'; 20 import 'runner/loader.dart';
18 import 'package:test/src/util/exit_codes.dart' as exit_codes; 21 import 'util/exit_codes.dart' as exit_codes;
19 import 'package:test/src/util/io.dart'; 22 import 'util/io.dart';
20 import 'package:test/src/utils.dart'; 23 import 'utils.dart';
21 24
22 /// The argument parser used to parse the executable arguments. 25 /// The argument parser used to parse the executable arguments.
23 final _parser = new ArgParser(allowTrailingOptions: true); 26 final _parser = new ArgParser(allowTrailingOptions: true);
24 27
25 void main(List<String> args) { 28 void main(List<String> args) {
26 _parser.addFlag("help", abbr: "h", negatable: false, 29 _parser.addFlag("help", abbr: "h", negatable: false,
27 help: "Shows this usage information."); 30 help: "Shows this usage information.");
28 _parser.addOption("package-root", hide: true); 31 _parser.addOption("package-root", hide: true);
29 _parser.addOption("name", 32 _parser.addOption("name",
30 abbr: 'n', 33 abbr: 'n',
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 output = stderr; 165 output = stderr;
163 } 166 }
164 167
165 output.write("""$message 168 output.write("""$message
166 169
167 Usage: pub run test:test [files or directories...] 170 Usage: pub run test:test [files or directories...]
168 171
169 ${_parser.usage} 172 ${_parser.usage}
170 """); 173 """);
171 } 174 }
OLDNEW
« no previous file with comments | « bin/test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698