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

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

Issue 411123002: Use package root in analysis server integration tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | no next file » | no next file with comments »
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 2b28fd38baf82e7c1d6a6c62f024e13fe4124417..72cd511a83d2d9c86e4539693058d0c3dedadd11 100644
--- a/pkg/analysis_server/test/integration/integration_tests.dart
+++ b/pkg/analysis_server/test/integration/integration_tests.dart
@@ -494,13 +494,29 @@ class Server {
* with "--debug", allowing a debugger to be attached.
*/
static Future<Server> start({bool debugServer: false}) {
+ // TODO(paulberry): move the logic for finding the script, the dart
+ // executable, and the package root into a shell script.
String dartBinary = Platform.executable;
- String serverPath = normalize(join(dirname(Platform.script.path), '..',
+ String scriptDir = dirname(Platform.script.path);
+ String serverPath = normalize(join(scriptDir, '..',
'..', 'bin', 'server.dart'));
+ String repoPath = normalize(join(scriptDir, '..', '..', '..', '..'));
+ String buildDirName;
+ if (Platform.isWindows) {
+ buildDirName = 'build';
+ } else if (Platform.isMacOS){
+ buildDirName = 'xcodebuild';
+ } else {
+ buildDirName = 'out';
+ }
+ String dartConfiguration = 'ReleaseIA32'; // TODO(paulberry): this is a guess
+ String buildPath = join(repoPath, buildDirName, dartConfiguration);
+ String packageRoot = join(buildPath, 'packages');
List<String> arguments = [];
if (debugServer) {
arguments.add('--debug');
}
+ arguments.add('--package-root=$packageRoot');
arguments.add(serverPath);
return Process.start(dartBinary, arguments).then((Process process) {
Server server = new Server._(process);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698