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

Side by Side Diff: pkg/analysis_server/test/integration/integration_tests.dart

Issue 1390843002: Turn on the new task model by default in analysis server. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/lib/src/server/driver.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) 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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 /** 590 /**
591 * Start the server. If [debugServer] is `true`, the server will be started 591 * Start the server. If [debugServer] is `true`, the server will be started
592 * with "--debug", allowing a debugger to be attached. If [profileServer] is 592 * with "--debug", allowing a debugger to be attached. If [profileServer] is
593 * `true`, the server will be started with "--observe" and 593 * `true`, the server will be started with "--observe" and
594 * "--pause-isolates-on-exit", allowing the observatory to be used. 594 * "--pause-isolates-on-exit", allowing the observatory to be used.
595 */ 595 */
596 Future start( 596 Future start(
597 {bool debugServer: false, 597 {bool debugServer: false,
598 int diagnosticPort, 598 int diagnosticPort,
599 bool profileServer: false, 599 bool profileServer: false,
600 bool newTaskModel: false, 600 bool newTaskModel: true,
601 bool useAnalysisHighlight2: false}) { 601 bool useAnalysisHighlight2: false}) {
602 if (_process != null) { 602 if (_process != null) {
603 throw new Exception('Process already started'); 603 throw new Exception('Process already started');
604 } 604 }
605 _time.start(); 605 _time.start();
606 String dartBinary = Platform.executable; 606 String dartBinary = Platform.executable;
607 String rootDir = 607 String rootDir =
608 findRoot(Platform.script.toFilePath(windows: Platform.isWindows)); 608 findRoot(Platform.script.toFilePath(windows: Platform.isWindows));
609 String serverPath = normalize(join(rootDir, 'bin', 'server.dart')); 609 String serverPath = normalize(join(rootDir, 'bin', 'server.dart'));
610 List<String> arguments = []; 610 List<String> arguments = [];
611 if (debugServer) { 611 if (debugServer) {
612 arguments.add('--debug'); 612 arguments.add('--debug');
613 } 613 }
614 if (profileServer) { 614 if (profileServer) {
615 arguments.add('--observe'); 615 arguments.add('--observe');
616 arguments.add('--pause-isolates-on-exit'); 616 arguments.add('--pause-isolates-on-exit');
617 } 617 }
618 if (Platform.packageRoot.isNotEmpty) { 618 if (Platform.packageRoot.isNotEmpty) {
619 arguments.add('--package-root=${Platform.packageRoot}'); 619 arguments.add('--package-root=${Platform.packageRoot}');
620 } 620 }
621 arguments.add('--checked'); 621 arguments.add('--checked');
622 arguments.add(serverPath); 622 arguments.add(serverPath);
623 if (diagnosticPort != null) { 623 if (diagnosticPort != null) {
624 arguments.add('--port'); 624 arguments.add('--port');
625 arguments.add(diagnosticPort.toString()); 625 arguments.add(diagnosticPort.toString());
626 } 626 }
627 if (useAnalysisHighlight2) { 627 if (useAnalysisHighlight2) {
628 arguments.add('--useAnalysisHighlight2'); 628 arguments.add('--useAnalysisHighlight2');
629 } 629 }
630 if (newTaskModel) { 630 if (!newTaskModel) {
631 arguments.add('--${analysisServer.Driver.ENABLE_NEW_TASK_MODEL}'); 631 arguments.add('--${analysisServer.Driver.DISABLE_NEW_TASK_MODEL}');
632 } 632 }
633 print('Launching $serverPath'); 633 print('Launching $serverPath');
634 print('$dartBinary ${arguments.join(' ')}'); 634 print('$dartBinary ${arguments.join(' ')}');
635 return Process.start(dartBinary, arguments).then((Process process) { 635 return Process.start(dartBinary, arguments).then((Process process) {
636 _process = process; 636 _process = process;
637 process.exitCode.then((int code) { 637 process.exitCode.then((int code) {
638 _recordStdio('TERMINATED WITH EXIT CODE $code'); 638 _recordStdio('TERMINATED WITH EXIT CODE $code');
639 if (code != 0) { 639 if (code != 0) {
640 _badDataFromServer(); 640 _badDataFromServer();
641 } 641 }
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 void populateMismatches(item, List<MismatchDescriber> mismatches); 888 void populateMismatches(item, List<MismatchDescriber> mismatches);
889 889
890 /** 890 /**
891 * Create a [MismatchDescriber] describing a mismatch with a simple string. 891 * Create a [MismatchDescriber] describing a mismatch with a simple string.
892 */ 892 */
893 MismatchDescriber simpleDescription(String description) => 893 MismatchDescriber simpleDescription(String description) =>
894 (Description mismatchDescription) { 894 (Description mismatchDescription) {
895 mismatchDescription.add(description); 895 mismatchDescription.add(description);
896 }; 896 };
897 } 897 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/server/driver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698