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

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

Issue 465513002: Split analysis_domain_int_test.dart into several test files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 0e3827fe02ce4ad44f1f5bbd3deb79612827c0bb..22ba63ec7be096e01a35e666b6b90b9cb5efc7ff 100644
--- a/pkg/analysis_server/test/integration/integration_tests.dart
+++ b/pkg/analysis_server/test/integration/integration_tests.dart
@@ -568,6 +568,21 @@ class Server {
}
/**
+ * Find the root directory of the analysis_server package by proceeding
+ * upward to the 'test' dir, and then going up one more directory.
+ */
+ String findRoot(String pathname) {
+ while (basename(pathname) != 'test') {
+ String parent = dirname(pathname);
+ if (parent.length >= pathname.length) {
+ throw new Exception("Can't find root directory");
+ }
+ pathname = parent;
+ }
+ return dirname(pathname);
+ }
+
+ /**
* Start the server. If [debugServer] is true, the server will be started
* with "--debug", allowing a debugger to be attached.
*/
@@ -579,10 +594,9 @@ class Server {
// 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 scriptDir = dirname(Platform.script.toFilePath(windows:
+ String rootDir = findRoot(Platform.script.toFilePath(windows:
Platform.isWindows));
- String serverPath = normalize(join(scriptDir, '..', '..', 'bin',
- 'server.dart'));
+ String serverPath = normalize(join(rootDir, 'bin', 'server.dart'));
List<String> arguments = [];
if (debugServer) {
arguments.add('--debug');
« no previous file with comments | « pkg/analysis_server/test/integration/analysis_error_int_test.dart ('k') | pkg/analysis_server/test/integration/test_all.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698