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

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

Issue 1101773002: Add Windows support. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Unused import 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 | « CHANGELOG.md ('k') | lib/src/runner/browser/compiler_pool.dart » ('j') | 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 // TODO(nweiz): This is under lib so that it can be used by the unittest dummy 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 6 // package. Once that package is no longer being updated, move this back into
7 // bin. 7 // bin.
8 library test.executable; 8 library test.executable;
9 9
10 import 'dart:async'; 10 import 'dart:async';
(...skipping 22 matching lines...) Expand all
33 /// This defaults to half the available processors, since presumably some of 33 /// This defaults to half the available processors, since presumably some of
34 /// them will be used for the OS and other processes. 34 /// them will be used for the OS and other processes.
35 final _defaultConcurrency = math.max(1, Platform.numberOfProcessors ~/ 2); 35 final _defaultConcurrency = math.max(1, Platform.numberOfProcessors ~/ 2);
36 36
37 /// A merged stream of all signals that tell the test runner to shut down 37 /// A merged stream of all signals that tell the test runner to shut down
38 /// gracefully. 38 /// gracefully.
39 /// 39 ///
40 /// Signals will only be captured as long as this has an active subscription. 40 /// Signals will only be captured as long as this has an active subscription.
41 /// Otherwise, they'll be handled by Dart's default signal handler, which 41 /// Otherwise, they'll be handled by Dart's default signal handler, which
42 /// terminates the program immediately. 42 /// terminates the program immediately.
43 final _signals = mergeStreams([ 43 final _signals = Platform.isWindows
44 ProcessSignal.SIGTERM.watch(), ProcessSignal.SIGINT.watch() 44 ? ProcessSignal.SIGINT.watch()
45 ]); 45 : mergeStreams([
46 ProcessSignal.SIGTERM.watch(),
47 ProcessSignal.SIGINT.watch()
48 ]);
46 49
47 /// Returns whether the current package has a pubspec which uses the 50 /// Returns whether the current package has a pubspec which uses the
48 /// `test/pub_serve` transformer. 51 /// `test/pub_serve` transformer.
49 bool get _usesTransformer { 52 bool get _usesTransformer {
50 if (!new File('pubspec.yaml').existsSync()) return false; 53 if (!new File('pubspec.yaml').existsSync()) return false;
51 var contents = new File('pubspec.yaml').readAsStringSync(); 54 var contents = new File('pubspec.yaml').readAsStringSync();
52 55
53 var yaml; 56 var yaml;
54 try { 57 try {
55 yaml = loadYaml(contents); 58 yaml = loadYaml(contents);
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 if (description is! Map) return false; 359 if (description is! Map) return false;
357 var path = description["path"]; 360 var path = description["path"];
358 if (path is! String) return false; 361 if (path is! String) return false;
359 362
360 print("$version (from $path)"); 363 print("$version (from $path)");
361 return true; 364 return true;
362 365
363 default: return false; 366 default: return false;
364 } 367 }
365 } 368 }
OLDNEW
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/runner/browser/compiler_pool.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698