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

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

Issue 2276033003: Correctly use sdk passed on command-line (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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
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 9835a1e2a3540f5b23387056c6cad6975989adb9..5ae41f93e0848b72a4e58e708fa4819f0bb3b85d 100644
--- a/pkg/analysis_server/test/integration/integration_tests.dart
+++ b/pkg/analysis_server/test/integration/integration_tests.dart
@@ -597,11 +597,12 @@ class Server {
* "--pause-isolates-on-exit", allowing the observatory to be used.
*/
Future start(
- {bool debugServer: false,
+ {bool checked: true,
+ bool debugServer: false,
int diagnosticPort,
bool profileServer: false,
+ String sdkPath,
int servicesPort,
- bool checked: true,
bool useAnalysisHighlight2: false}) {
if (_process != null) {
throw new Exception('Process already started');
@@ -612,6 +613,9 @@ class Server {
findRoot(Platform.script.toFilePath(windows: Platform.isWindows));
String serverPath = normalize(join(rootDir, 'bin', 'server.dart'));
List<String> arguments = [];
+ //
+ // Add VM arguments.
+ //
if (debugServer) {
arguments.add('--debug');
}
@@ -631,11 +635,20 @@ class Server {
if (checked) {
arguments.add('--checked');
}
+ //
+ // Add the server executable.
+ //
arguments.add(serverPath);
+ //
+ // Add server arguments.
+ //
if (diagnosticPort != null) {
arguments.add('--port');
arguments.add(diagnosticPort.toString());
}
+ if (sdkPath != null) {
+ arguments.add('--sdk=$sdkPath');
+ }
if (useAnalysisHighlight2) {
arguments.add('--useAnalysisHighlight2');
}

Powered by Google App Engine
This is Rietveld 408576698