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

Side by Side Diff: pkg/analysis_server/test/stress/utilities/server.dart

Issue 2696323004: Tests for analysis.navigation. (Closed)
Patch Set: review updates Created 3 years, 10 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 | « pkg/analysis_server/test/integration/integration_tests.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 /** 5 /**
6 * Support for interacting with an analysis server that is running in a separate 6 * Support for interacting with an analysis server that is running in a separate
7 * process. 7 * process.
8 */ 8 */
9 import 'dart:async'; 9 import 'dart:async';
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 601
602 void sendServerShutdown() { 602 void sendServerShutdown() {
603 _send("server.shutdown", null); 603 _send("server.shutdown", null);
604 } 604 }
605 605
606 /** 606 /**
607 * Start the server and listen for communications from it. 607 * Start the server and listen for communications from it.
608 * 608 *
609 * If [checked] is `true`, the server's VM will be running in checked mode. 609 * If [checked] is `true`, the server's VM will be running in checked mode.
610 * 610 *
611 * If [debugServer] is `true`, the server will be started with "--debug",
612 * allowing a debugger to be attached.
613 *
614 * If [diagnosticPort] is not `null`, the server will serve status pages to 611 * If [diagnosticPort] is not `null`, the server will serve status pages to
615 * the specified port. 612 * the specified port.
616 * 613 *
617 * If [enableNewAnalysisDriver] is `true`, the server will use the new 614 * If [enableNewAnalysisDriver] is `true`, the server will use the new
618 * analysis driver. 615 * analysis driver.
619 * 616 *
620 * If [profileServer] is `true`, the server will be started with "--observe" 617 * If [profileServer] is `true`, the server will be started with "--observe"
621 * and "--pause-isolates-on-exit", allowing the observatory to be used. 618 * and "--pause-isolates-on-exit", allowing the observatory to be used.
622 * 619 *
623 * If [useAnalysisHighlight2] is `true`, the server will use the new highlight 620 * If [useAnalysisHighlight2] is `true`, the server will use the new highlight
624 * APIs. 621 * APIs.
625 */ 622 */
626 Future<Null> start( 623 Future<Null> start(
627 {bool checked: true, 624 {bool checked: true,
628 bool debugServer: false,
629 int diagnosticPort, 625 int diagnosticPort,
630 bool enableNewAnalysisDriver: false, 626 bool enableNewAnalysisDriver: false,
631 bool profileServer: false, 627 bool profileServer: false,
632 String sdkPath, 628 String sdkPath,
633 int servicesPort, 629 int servicesPort,
634 bool useAnalysisHighlight2: false}) async { 630 bool useAnalysisHighlight2: false}) async {
635 if (_process != null) { 631 if (_process != null) {
636 throw new Exception('Process already started'); 632 throw new Exception('Process already started');
637 } 633 }
638 String dartBinary = Platform.executable; 634 String dartBinary = Platform.executable;
639 String rootDir = 635 String rootDir =
640 _findRoot(Platform.script.toFilePath(windows: Platform.isWindows)); 636 _findRoot(Platform.script.toFilePath(windows: Platform.isWindows));
641 String serverPath = 637 String serverPath =
642 path.normalize(path.join(rootDir, 'bin', 'server.dart')); 638 path.normalize(path.join(rootDir, 'bin', 'server.dart'));
643 List<String> arguments = []; 639 List<String> arguments = [];
644 // 640 //
645 // Add VM arguments. 641 // Add VM arguments.
646 // 642 //
647 if (debugServer) {
648 arguments.add('--debug');
649 }
650 if (profileServer) { 643 if (profileServer) {
651 if (servicesPort == null) { 644 if (servicesPort == null) {
652 arguments.add('--observe'); 645 arguments.add('--observe');
653 } else { 646 } else {
654 arguments.add('--observe=$servicesPort'); 647 arguments.add('--observe=$servicesPort');
655 } 648 }
656 arguments.add('--pause-isolates-on-exit'); 649 arguments.add('--pause-isolates-on-exit');
657 } else if (servicesPort != null) { 650 } else if (servicesPort != null) {
658 arguments.add('--enable-vm-service=$servicesPort'); 651 arguments.add('--enable-vm-service=$servicesPort');
659 } 652 }
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 if (buffer.length > 0) { 1077 if (buffer.length > 0) {
1085 buffer.writeln(); 1078 buffer.writeln();
1086 buffer.writeln(); 1079 buffer.writeln();
1087 } 1080 }
1088 buffer.writeln(filePath); 1081 buffer.writeln(filePath);
1089 _writeErrors(' Expected ', expectedErrors); 1082 _writeErrors(' Expected ', expectedErrors);
1090 buffer.writeln(); 1083 buffer.writeln();
1091 _writeErrors(' Found ', actualErrors); 1084 _writeErrors(' Found ', actualErrors);
1092 } 1085 }
1093 } 1086 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/integration/integration_tests.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698