| 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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 * Start the server. If [debugServer] is `true`, the server will be started | 636 * Start the server. If [debugServer] is `true`, the server will be started |
| 637 * with "--debug", allowing a debugger to be attached. If [profileServer] is | 637 * with "--debug", allowing a debugger to be attached. If [profileServer] is |
| 638 * `true`, the server will be started with "--observe" and | 638 * `true`, the server will be started with "--observe" and |
| 639 * "--pause-isolates-on-exit", allowing the observatory to be used. | 639 * "--pause-isolates-on-exit", allowing the observatory to be used. |
| 640 */ | 640 */ |
| 641 Future start( | 641 Future start( |
| 642 {bool checked: true, | 642 {bool checked: true, |
| 643 bool debugServer: false, | 643 bool debugServer: false, |
| 644 int diagnosticPort, | 644 int diagnosticPort, |
| 645 bool enableNewAnalysisDriver: false, | 645 bool enableNewAnalysisDriver: false, |
| 646 bool noErrorNotification: false, |
| 646 bool profileServer: false, | 647 bool profileServer: false, |
| 647 String sdkPath, | 648 String sdkPath, |
| 648 int servicesPort, | 649 int servicesPort, |
| 649 bool useAnalysisHighlight2: false}) { | 650 bool useAnalysisHighlight2: false}) { |
| 650 if (_process != null) { | 651 if (_process != null) { |
| 651 throw new Exception('Process already started'); | 652 throw new Exception('Process already started'); |
| 652 } | 653 } |
| 653 _time.start(); | 654 _time.start(); |
| 654 String dartBinary = Platform.executable; | 655 String dartBinary = Platform.executable; |
| 655 String rootDir = | 656 String rootDir = |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 } | 695 } |
| 695 if (sdkPath != null) { | 696 if (sdkPath != null) { |
| 696 arguments.add('--sdk=$sdkPath'); | 697 arguments.add('--sdk=$sdkPath'); |
| 697 } | 698 } |
| 698 if (useAnalysisHighlight2) { | 699 if (useAnalysisHighlight2) { |
| 699 arguments.add('--useAnalysisHighlight2'); | 700 arguments.add('--useAnalysisHighlight2'); |
| 700 } | 701 } |
| 701 if (!enableNewAnalysisDriver) { | 702 if (!enableNewAnalysisDriver) { |
| 702 arguments.add('--disable-new-analysis-driver'); | 703 arguments.add('--disable-new-analysis-driver'); |
| 703 } | 704 } |
| 705 if (noErrorNotification) { |
| 706 arguments.add('--no-error-notification'); |
| 707 } |
| 704 // print('Launching $serverPath'); | 708 // print('Launching $serverPath'); |
| 705 // print('$dartBinary ${arguments.join(' ')}'); | 709 // print('$dartBinary ${arguments.join(' ')}'); |
| 706 return Process.start(dartBinary, arguments).then((Process process) { | 710 return Process.start(dartBinary, arguments).then((Process process) { |
| 707 _process = process; | 711 _process = process; |
| 708 process.exitCode.then((int code) { | 712 process.exitCode.then((int code) { |
| 709 if (code != 0) { | 713 if (code != 0) { |
| 710 _badDataFromServer('server terminated with exit code $code'); | 714 _badDataFromServer('server terminated with exit code $code'); |
| 711 } | 715 } |
| 712 }); | 716 }); |
| 713 }); | 717 }); |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 void populateMismatches(item, List<MismatchDescriber> mismatches); | 966 void populateMismatches(item, List<MismatchDescriber> mismatches); |
| 963 | 967 |
| 964 /** | 968 /** |
| 965 * Create a [MismatchDescriber] describing a mismatch with a simple string. | 969 * Create a [MismatchDescriber] describing a mismatch with a simple string. |
| 966 */ | 970 */ |
| 967 MismatchDescriber simpleDescription(String description) => | 971 MismatchDescriber simpleDescription(String description) => |
| 968 (Description mismatchDescription) { | 972 (Description mismatchDescription) { |
| 969 mismatchDescription.add(description); | 973 mismatchDescription.add(description); |
| 970 }; | 974 }; |
| 971 } | 975 } |
| OLD | NEW |