| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.integration.analysis; | 5 library test.integration.analysis; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:convert'; | 9 import 'dart:convert'; |
| 10 import 'dart:io'; | 10 import 'dart:io'; |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 return dirname(pathname); | 678 return dirname(pathname); |
| 679 } | 679 } |
| 680 | 680 |
| 681 /** | 681 /** |
| 682 * Start the server. If [debugServer] is `true`, the server will be started | 682 * Start the server. If [debugServer] is `true`, the server will be started |
| 683 * with "--debug", allowing a debugger to be attached. If [profileServer] is | 683 * with "--debug", allowing a debugger to be attached. If [profileServer] is |
| 684 * `true`, the server will be started with "--observe" and | 684 * `true`, the server will be started with "--observe" and |
| 685 * "--pause-isolates-on-exit", allowing the observatory to be used. | 685 * "--pause-isolates-on-exit", allowing the observatory to be used. |
| 686 */ | 686 */ |
| 687 Future start(NotificationProcessor notificationProcessor, {bool debugServer: | 687 Future start(NotificationProcessor notificationProcessor, {bool debugServer: |
| 688 false, bool profileServer: true}) { | 688 false, bool profileServer: false}) { |
| 689 if (_process != null) { | 689 if (_process != null) { |
| 690 throw new Exception('Process already started'); | 690 throw new Exception('Process already started'); |
| 691 } | 691 } |
| 692 _time.start(); | 692 _time.start(); |
| 693 String dartBinary = Platform.executable; | 693 String dartBinary = Platform.executable; |
| 694 String rootDir = | 694 String rootDir = |
| 695 findRoot(Platform.script.toFilePath(windows: Platform.isWindows)); | 695 findRoot(Platform.script.toFilePath(windows: Platform.isWindows)); |
| 696 String serverPath = normalize(join(rootDir, 'bin', 'server.dart')); | 696 String serverPath = normalize(join(rootDir, 'bin', 'server.dart')); |
| 697 List<String> arguments = []; | 697 List<String> arguments = []; |
| 698 if (debugServer) { | 698 if (debugServer) { |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 */ | 865 */ |
| 866 void _recordStdio(String line) { | 866 void _recordStdio(String line) { |
| 867 double elapsedTime = _time.elapsedTicks / _time.frequency; | 867 double elapsedTime = _time.elapsedTicks / _time.frequency; |
| 868 line = "$elapsedTime: $line"; | 868 line = "$elapsedTime: $line"; |
| 869 if (_debuggingStdio) { | 869 if (_debuggingStdio) { |
| 870 print(line); | 870 print(line); |
| 871 } | 871 } |
| 872 _recordedStdio.add(line); | 872 _recordedStdio.add(line); |
| 873 } | 873 } |
| 874 } | 874 } |
| OLD | NEW |