[cfe] Fix git access in presubmit script on Windows

Change-Id: I6c871264dc1fff39b19421ce1f5513eb2e56901d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163061
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
Johnni Winther
2020-09-16 14:17:18 +00:00
committed by commit-bot@chromium.org
parent 44b765f945
commit b3bd2e95e7
4 changed files with 13 additions and 7 deletions
@@ -1903,7 +1903,9 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
isMixinDeclaration ? null : supertype,
isNamedMixinApplication
? interfaces
: isMixinDeclaration ? [supertype, mixin] : null,
: isMixinDeclaration
? [supertype, mixin]
: null,
null, // No `on` clause types.
new Scope(
local: <String, MemberBuilder>{},
+4 -4
View File
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:io' show Platform, Process, ProcessResult;
import 'dart:io' show Directory, Process, ProcessResult;
import 'package:testing/testing.dart' show Chain, TestDescription;
@@ -21,9 +21,9 @@ Stream<TestDescription> filterList(
}
Future<Set<Uri>> getGitFiles(Chain suite) async {
ProcessResult result = await Process.run(
Platform.isWindows ? "git.bat" : "git", ["ls-files", "."],
workingDirectory: suite.uri.path);
ProcessResult result = await Process.run("git", ["ls-files", "."],
workingDirectory: new Directory.fromUri(suite.uri).absolute.path,
runInShell: true);
String stdout = result.stdout;
return stdout
.split(new RegExp('^', multiLine: true))
@@ -325,7 +325,9 @@ class SuperCallResolutionTransformer extends Transformer {
hierarchy.getDispatchTarget(lookupClass, new Name("noSuchMethod"));
String methodNameUsed = (isGetter)
? "get:$methodName"
: (isSetter) ? "set:$methodName=" : methodName;
: (isSetter)
? "set:$methodName="
: methodName;
if (noSuchMethod != null &&
noSuchMethod.function.positionalParameters.length == 1 &&
noSuchMethod.function.namedParameters.isEmpty) {
@@ -406,7 +406,9 @@ class _FfiDefinitionTransformer extends FfiTransformer {
// _fromAddress<Int8>(_loadIntPtr(pointer, offset));
final loadMethod = isPointer
? loadMethods[NativeType.kIntptr]
: optimizedTypes.contains(type) ? loadMethods[type] : loadStructMethod;
: optimizedTypes.contains(type)
? loadMethods[type]
: loadStructMethod;
Expression getterReturnValue = StaticInvocation(
loadMethod,
Arguments([