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

Unified Diff: pkg/analyzer/lib/src/dart/sdk/sdk.dart

Issue 2385223002: Fix for running tests under windows (Closed)
Patch Set: Created 4 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 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/analyzer/lib/src/dart/sdk/sdk.dart
diff --git a/pkg/analyzer/lib/src/dart/sdk/sdk.dart b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
index 7ab8272011ce21a18e8ded28635029be9e4f8fb7..2e71aebc2c7c352c1011972a25938026af09da84 100644
--- a/pkg/analyzer/lib/src/dart/sdk/sdk.dart
+++ b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
@@ -680,6 +680,14 @@ class FolderBasedDartSdk extends AbstractDartSdk {
return null;
}
pathos.Context pathContext = resourceProvider.pathContext;
+ if (pathContext != pathos.context) {
+ // The only time this will be true is if pathContext == posix and
+ // pathos.context == windows, which only happens when running tests.
+ if (exec.startsWith(new RegExp('[a-zA-Z]:'))) {
+ exec = exec.substring(2);
+ }
+ exec = pathContext.fromUri(pathos.context.toUri(exec));
+ }
// Might be "xcodebuild/ReleaseIA32/dart" with "sdk" sibling
String outDir = pathContext.dirname(pathContext.dirname(exec));
String sdkPath = pathContext.join(pathContext.dirname(outDir), "sdk");
« 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