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

Unified Diff: pkg/analysis_server/test/integration/integration_tests.dart

Issue 1334353002: - Add getters for the current packageRoot or packageMap. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update tests and move to ToT. Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/docgen/lib/src/generator.dart » ('j') | pkg/docgen/lib/src/generator.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/integration/integration_tests.dart
diff --git a/pkg/analysis_server/test/integration/integration_tests.dart b/pkg/analysis_server/test/integration/integration_tests.dart
index 08fb56d02234d4b67b2697f29549d6e479f0dad9..9c91bffb212f970f8cb710c4968a3115cb17b022 100644
--- a/pkg/analysis_server/test/integration/integration_tests.dart
+++ b/pkg/analysis_server/test/integration/integration_tests.dart
@@ -598,7 +598,7 @@ class Server {
int diagnosticPort,
bool profileServer: false,
bool newTaskModel: false,
- bool useAnalysisHighlight2: false}) {
+ bool useAnalysisHighlight2: false}) async {
if (_process != null) {
throw new Exception('Process already started');
}
@@ -615,8 +615,9 @@ class Server {
arguments.add('--observe');
arguments.add('--pause-isolates-on-exit');
}
- if (Platform.packageRoot.isNotEmpty) {
- arguments.add('--package-root=${Platform.packageRoot}');
+ Uri packageRoot = await Platform.packageRoot;
+ if (packageRoot != null) {
+ arguments.add('--package-root=${packageRoot.toFilePath()}');
}
Lasse Reichstein Nielsen 2015/09/22 09:48:25 Add a TODO to support --packages as well.
arguments.add('--checked');
arguments.add(serverPath);
@@ -630,15 +631,16 @@ class Server {
if (newTaskModel) {
arguments.add('--${analysisServer.Driver.ENABLE_NEW_TASK_MODEL}');
}
- return Process.start(dartBinary, arguments).then((Process process) {
- _process = process;
- process.exitCode.then((int code) {
- _recordStdio('TERMINATED WITH EXIT CODE $code');
- if (code != 0) {
- _badDataFromServer();
- }
- });
+ _process = await Process.start(dartBinary, arguments);
+ _process.exitCode.then((int code) {
Lasse Reichstein Nielsen 2015/09/22 09:48:25 Tricky. They should consider documenting that this
+ _recordStdio('TERMINATED WITH EXIT CODE $code');
+ if (code != 0) {
+ _badDataFromServer();
+ }
});
+ // Complete this function with no value, but signalling that the server
+ // process has started.
+ return null;
}
/**
« no previous file with comments | « no previous file | pkg/docgen/lib/src/generator.dart » ('j') | pkg/docgen/lib/src/generator.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698