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

Side by Side Diff: pkg/analyzer/lib/src/dart/sdk/sdk.dart

Issue 2398113002: Fix more tests on windows bots (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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.src.generated.sdk2; 5 library analyzer.src.generated.sdk2;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io' as io; 9 import 'dart:io' as io;
10 10
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 return sdkDirectory; 674 return sdkDirectory;
675 } 675 }
676 676
677 static String getSdkProperty(ResourceProvider resourceProvider) { 677 static String getSdkProperty(ResourceProvider resourceProvider) {
678 String exec = io.Platform.resolvedExecutable; 678 String exec = io.Platform.resolvedExecutable;
679 if (exec.length == 0) { 679 if (exec.length == 0) {
680 return null; 680 return null;
681 } 681 }
682 pathos.Context pathContext = resourceProvider.pathContext; 682 pathos.Context pathContext = resourceProvider.pathContext;
683 if (pathContext.style != pathos.context.style) { 683 if (pathContext.style != pathos.context.style) {
684 // This will only be true if pathContext == posix and 684 // This will only happen when running tests.
685 // pathos.context == windows, which only happens when running tests.
686 if (exec.startsWith(new RegExp('[a-zA-Z]:'))) { 685 if (exec.startsWith(new RegExp('[a-zA-Z]:'))) {
687 exec = exec.substring(2); 686 exec = exec.substring(2);
687 } else if (resourceProvider is MemoryResourceProvider) {
688 exec = resourceProvider.convertPath(exec);
688 } 689 }
689 exec = pathContext.fromUri(pathos.context.toUri(exec)); 690 exec = pathContext.fromUri(pathos.context.toUri(exec));
690 } 691 }
691 // Might be "xcodebuild/ReleaseIA32/dart" with "sdk" sibling 692 // Might be "xcodebuild/ReleaseIA32/dart" with "sdk" sibling
692 String outDir = pathContext.dirname(pathContext.dirname(exec)); 693 String outDir = pathContext.dirname(pathContext.dirname(exec));
693 String sdkPath = pathContext.join(pathContext.dirname(outDir), "sdk"); 694 String sdkPath = pathContext.join(pathContext.dirname(outDir), "sdk");
694 if (resourceProvider.getFolder(sdkPath).exists) { 695 if (resourceProvider.getFolder(sdkPath).exists) {
695 return sdkPath; 696 return sdkPath;
696 } 697 }
697 // probably be "dart-sdk/bin/dart" 698 // probably be "dart-sdk/bin/dart"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 SdkLibrariesReader_LibraryBuilder libraryBuilder = 878 SdkLibrariesReader_LibraryBuilder libraryBuilder =
878 new SdkLibrariesReader_LibraryBuilder(_useDart2jsPaths); 879 new SdkLibrariesReader_LibraryBuilder(_useDart2jsPaths);
879 // If any syntactic errors were found then don't try to visit the AST 880 // If any syntactic errors were found then don't try to visit the AST
880 // structure. 881 // structure.
881 if (!errorListener.errorReported) { 882 if (!errorListener.errorReported) {
882 unit.accept(libraryBuilder); 883 unit.accept(libraryBuilder);
883 } 884 }
884 return libraryBuilder.librariesMap; 885 return libraryBuilder.librariesMap;
885 } 886 }
886 } 887 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/package_test.dart » ('j') | pkg/analyzer/test/source/sdk_ext_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698