Unverified Commit 66ba4b24 authored by Christopher Fujino's avatar Christopher Fujino Committed by GitHub

Revert "Improve codesign script (#71244)" (#73961)

This reverts commit b7f5aef1.
parent b7f5aef1
...@@ -2,24 +2,184 @@ ...@@ -2,24 +2,184 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import 'dart:io' as io; import 'dart:io';
import 'package:path/path.dart' as path; import 'package:path/path.dart' as path;
// TODO(fujino): delete this script once PR #71244 lands on stable. String get repoRoot => path.normalize(path.join(path.dirname(Platform.script.toFilePath()), '..', '..'));
void main(List<String> args) { String get cacheDirectory => path.normalize(path.join(repoRoot, 'bin', 'cache'));
final String scriptPath = io.Platform.script.toFilePath();
final String scriptDir = path.dirname(scriptPath); /// Check mime-type of file at [filePath] to determine if it is binary
final String repoRoot = path.normalize(path.join(scriptDir, '..', '..')); bool isBinary(String filePath) {
final io.ProcessResult result = io.Process.runSync( final ProcessResult result = Process.runSync(
path.join(repoRoot, 'dev', 'tools', 'bin', 'conductor'), 'file',
<String>['codesign', '--verify'], <String>[
'--mime-type',
'-b', // is binary
filePath,
],
);
return (result.stdout as String).contains('application/x-mach-binary');
}
/// Find every binary file in the given [rootDirectory]
List<String> findBinaryPaths([String rootDirectory]) {
rootDirectory ??= cacheDirectory;
final ProcessResult result = Process.runSync(
'find',
<String>[
rootDirectory,
'-type',
'f',
'-perm',
'+111', // is executable
],
);
final List<String> allFiles = (result.stdout as String).split('\n').where((String s) => s.isNotEmpty).toList();
return allFiles.where(isBinary).toList();
}
/// Given the path to a stamp file, read the contents.
///
/// Will throw if the file doesn't exist.
String readStamp(String filePath) {
final File file = File(filePath);
if (!file.existsSync()) {
throw 'Error! Stamp file $filePath does not exist!';
}
return file.readAsStringSync().trim();
}
/// Return whether or not the flutter cache is up to date.
bool checkCacheIsCurrent() {
try {
final String dartSdkStamp = readStamp(path.join(cacheDirectory, 'engine-dart-sdk.stamp'));
final String engineVersion = readStamp(path.join(repoRoot, 'bin', 'internal', 'engine.version'));
return dartSdkStamp == engineVersion;
} catch (e) {
print(e);
return false;
}
}
List<String> get binariesWithEntitlements => List<String>.unmodifiable(<String>[
'ideviceinfo',
'idevicename',
'idevicescreenshot',
'idevicesyslog',
'libimobiledevice.6.dylib',
'libplist.3.dylib',
'iproxy',
'libusbmuxd.4.dylib',
'libssl.1.0.0.dylib',
'libcrypto.1.0.0.dylib',
'libzip.5.0.dylib',
'libzip.5.dylib',
'gen_snapshot',
'dart',
'flutter_tester',
'gen_snapshot_arm64',
'gen_snapshot_armv7',
]);
List<String> get expectedEntitlements => List<String>.unmodifiable(<String>[
'com.apple.security.cs.allow-jit',
'com.apple.security.cs.allow-unsigned-executable-memory',
'com.apple.security.cs.allow-dyld-environment-variables',
'com.apple.security.network.client',
'com.apple.security.network.server',
'com.apple.security.cs.disable-library-validation',
]);
/// Check if the binary has the expected entitlements.
bool hasExpectedEntitlements(String binaryPath) {
try {
final ProcessResult entitlementResult = Process.runSync(
'codesign',
<String>[
'--display',
'--entitlements',
':-',
binaryPath,
],
); );
if (result.exitCode != 0) {
print('codesign script exited with code $result.exitCode'); if (entitlementResult.exitCode != 0) {
print('stdout:\n${result.stdout}\n'); print('The `codesign --entitlements` command failed with exit code ${entitlementResult.exitCode}:\n'
print('stderr:\n${result.stderr}\n'); '${entitlementResult.stderr}\n');
io.exit(1); return false;
} }
print('codesign script succeeded.');
print('stdout:\n${result.stdout}'); bool passes = true;
final String output = entitlementResult.stdout as String;
for (final String entitlement in expectedEntitlements) {
final bool entitlementExpected = binariesWithEntitlements.contains(path.basename(binaryPath));
if (output.contains(entitlement) != entitlementExpected) {
print('File "$binaryPath" ${entitlementExpected ? 'does not have expected' : 'has unexpected'} entitlement $entitlement.');
passes = false;
}
}
return passes;
} catch (e) {
print(e);
return false;
}
}
void main() {
if (!Platform.isMacOS) {
print('Error! Expected operating system "macos", actual operating system '
'is: "${Platform.operatingSystem}"');
exit(1);
}
if (!checkCacheIsCurrent()) {
print(
'Warning! Your cache is either not present or not matching your flutter\n'
'version. Run a `flutter` command to update your cache, and re-try this\n'
'test.');
exit(1);
}
final List<String> unsignedBinaries = <String>[];
final List<String> wrongEntitlementBinaries = <String>[];
for (final String binaryPath in findBinaryPaths(cacheDirectory)) {
print('Verifying the code signature of $binaryPath');
final ProcessResult codeSignResult = Process.runSync(
'codesign',
<String>[
'-vvv',
binaryPath,
],
);
if (codeSignResult.exitCode != 0) {
unsignedBinaries.add(binaryPath);
print('File "$binaryPath" does not appear to be codesigned.\n'
'The `codesign` command failed with exit code ${codeSignResult.exitCode}:\n'
'${codeSignResult.stderr}\n');
continue;
} else {
print('Verifying entitlements of $binaryPath');
if (!hasExpectedEntitlements(binaryPath)) {
wrongEntitlementBinaries.add(binaryPath);
}
}
}
if (unsignedBinaries.isNotEmpty) {
print('Found ${unsignedBinaries.length} unsigned binaries:');
unsignedBinaries.forEach(print);
}
if (wrongEntitlementBinaries.isNotEmpty) {
print('Found ${wrongEntitlementBinaries.length} binaries with unexpected entitlements:');
wrongEntitlementBinaries.forEach(print);
}
if (unsignedBinaries.isNotEmpty) {
// TODO(jmagman): Also exit if `wrongEntitlementBinaries.isNotEmpty` after https://github.com/flutter/flutter/issues/46704 is done.
exit(1);
}
print('Verified that binaries are codesigned and have expected entitlements.');
} }
...@@ -694,7 +694,7 @@ Future<void> _runFrameworkTests() async { ...@@ -694,7 +694,7 @@ Future<void> _runFrameworkTests() async {
await _pubRunTest(path.join(flutterRoot, 'dev', 'bots'), tableData: bigqueryApi?.tabledata); await _pubRunTest(path.join(flutterRoot, 'dev', 'bots'), tableData: bigqueryApi?.tabledata);
await _pubRunTest(path.join(flutterRoot, 'dev', 'devicelab'), tableData: bigqueryApi?.tabledata); await _pubRunTest(path.join(flutterRoot, 'dev', 'devicelab'), tableData: bigqueryApi?.tabledata);
await _pubRunTest(path.join(flutterRoot, 'dev', 'snippets'), tableData: bigqueryApi?.tabledata); await _pubRunTest(path.join(flutterRoot, 'dev', 'snippets'), tableData: bigqueryApi?.tabledata);
await _pubRunTest(path.join(flutterRoot, 'dev', 'tools'), tableData: bigqueryApi?.tabledata, forceSingleCore: true); await _pubRunTest(path.join(flutterRoot, 'dev', 'tools'), tableData: bigqueryApi?.tabledata);
await _pubRunTest(path.join(flutterRoot, 'dev', 'benchmarks', 'metrics_center'), tableData: bigqueryApi?.tabledata); await _pubRunTest(path.join(flutterRoot, 'dev', 'benchmarks', 'metrics_center'), tableData: bigqueryApi?.tabledata);
await _runFlutterTest(path.join(flutterRoot, 'dev', 'integration_tests', 'android_semantics_testing'), tableData: bigqueryApi?.tabledata); await _runFlutterTest(path.join(flutterRoot, 'dev', 'integration_tests', 'android_semantics_testing'), tableData: bigqueryApi?.tabledata);
await _runFlutterTest(path.join(flutterRoot, 'dev', 'manual_tests'), tableData: bigqueryApi?.tabledata); await _runFlutterTest(path.join(flutterRoot, 'dev', 'manual_tests'), tableData: bigqueryApi?.tabledata);
......
...@@ -10,17 +10,15 @@ ...@@ -10,17 +10,15 @@
import 'dart:io' as io; import 'dart:io' as io;
import 'package:args/command_runner.dart'; import 'package:args/command_runner.dart';
import 'package:dev_tools/codesign.dart';
import 'package:dev_tools/globals.dart';
import 'package:dev_tools/roll_dev.dart';
import 'package:dev_tools/repository.dart';
import 'package:dev_tools/stdio.dart';
import 'package:file/file.dart'; import 'package:file/file.dart';
import 'package:file/local.dart'; import 'package:file/local.dart';
import 'package:platform/platform.dart'; import 'package:platform/platform.dart';
import 'package:process/process.dart'; import 'package:process/process.dart';
import 'package:dev_tools/repository.dart';
import 'package:dev_tools/roll_dev.dart';
import 'package:dev_tools/stdio.dart';
Future<void> main(List<String> args) async { void main(List<String> args) {
const FileSystem fileSystem = LocalFileSystem(); const FileSystem fileSystem = LocalFileSystem();
const ProcessManager processManager = LocalProcessManager(); const ProcessManager processManager = LocalProcessManager();
const Platform platform = LocalPlatform(); const Platform platform = LocalPlatform();
...@@ -31,12 +29,9 @@ Future<void> main(List<String> args) async { ...@@ -31,12 +29,9 @@ Future<void> main(List<String> args) async {
); );
final Checkouts checkouts = Checkouts( final Checkouts checkouts = Checkouts(
fileSystem: fileSystem, fileSystem: fileSystem,
parentDirectory: localFlutterRoot.parent,
platform: platform, platform: platform,
processManager: processManager, processManager: processManager,
stdio: stdio,
); );
final CommandRunner<void> runner = CommandRunner<void>( final CommandRunner<void> runner = CommandRunner<void>(
'conductor', 'conductor',
'A tool for coordinating Flutter releases.', 'A tool for coordinating Flutter releases.',
...@@ -44,15 +39,16 @@ Future<void> main(List<String> args) async { ...@@ -44,15 +39,16 @@ Future<void> main(List<String> args) async {
); );
<Command<void>>[ <Command<void>>[
RollDevCommand( RollDev(
checkouts: checkouts, fileSystem: fileSystem,
platform: platform,
repository: checkouts.addRepo(
fileSystem: fileSystem, fileSystem: fileSystem,
platform: platform, platform: platform,
repoType: RepositoryType.framework,
stdio: stdio, stdio: stdio,
), ),
CodesignCommand( stdio: stdio,
checkouts: checkouts,
flutterRoot: localFlutterRoot,
), ),
].forEach(runner.addCommand); ].forEach(runner.addCommand);
...@@ -62,9 +58,20 @@ Future<void> main(List<String> args) async { ...@@ -62,9 +58,20 @@ Future<void> main(List<String> args) async {
} }
try { try {
await runner.run(args); runner.run(args);
} on Exception catch (e) { } on Exception catch (e) {
stdio.printError(e.toString()); stdio.printError(e.toString());
io.exit(1); io.exit(1);
} }
} }
bool assertsEnabled() {
// Verify asserts enabled
bool assertsEnabled = false;
assert(() {
assertsEnabled = true;
return true;
}());
return assertsEnabled;
}
This diff is collapsed.
...@@ -45,7 +45,6 @@ class Git { ...@@ -45,7 +45,6 @@ class Git {
return processManager.runSync( return processManager.runSync(
<String>['git', ...args], <String>['git', ...args],
workingDirectory: workingDirectory, workingDirectory: workingDirectory,
environment: <String, String>{'GIT_TRACE': '1'},
); );
} }
......
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import 'package:file/file.dart';
import 'package:file/local.dart';
import 'package:platform/platform.dart';
const String kIncrement = 'increment'; const String kIncrement = 'increment';
const String kCommit = 'commit'; const String kCommit = 'commit';
const String kRemoteName = 'remote'; const String kRemoteName = 'remote';
...@@ -28,61 +24,3 @@ String stdoutToString(dynamic input) { ...@@ -28,61 +24,3 @@ String stdoutToString(dynamic input) {
final String str = input as String; final String str = input as String;
return str.trim(); return str.trim();
} }
class ConductorException implements Exception {
ConductorException(this.message);
final String message;
@override
String toString() => 'Exception: $message';
}
Directory _flutterRoot;
Directory get localFlutterRoot {
if (_flutterRoot != null) {
return _flutterRoot;
}
String filePath;
const FileSystem fileSystem = LocalFileSystem();
const Platform platform = LocalPlatform();
// If a test
if (platform.script.scheme == 'data') {
final RegExp pattern = RegExp(
r'(file:\/\/[^"]*[/\\]dev\/tools[/\\][^"]+\.dart)',
multiLine: true,
);
final Match match =
pattern.firstMatch(Uri.decodeFull(platform.script.path));
if (match == null) {
throw Exception(
'Cannot determine path of script!\n${platform.script.path}',
);
}
filePath = Uri.parse(match.group(1)).path.replaceAll(r'%20', ' ');
} else {
filePath = platform.script.toFilePath();
}
final String checkoutsDirname = fileSystem.path.normalize(
fileSystem.path.join(
fileSystem.path.dirname(filePath),
'..', // flutter/dev/tools
'..', // flutter/dev
'..', // flutter
),
);
_flutterRoot = fileSystem.directory(checkoutsDirname);
return _flutterRoot;
}
bool assertsEnabled() {
// Verify asserts enabled
bool assertsEnabled = false;
assert(() {
assertsEnabled = true;
return true;
}());
return assertsEnabled;
}
This diff is collapsed.
...@@ -14,12 +14,12 @@ import './stdio.dart'; ...@@ -14,12 +14,12 @@ import './stdio.dart';
import './version.dart'; import './version.dart';
/// Create a new dev release without cherry picks. /// Create a new dev release without cherry picks.
class RollDevCommand extends Command<void> { class RollDev extends Command<void> {
RollDevCommand({ RollDev({
@required this.checkouts, this.fileSystem,
@required this.fileSystem, this.platform,
@required this.platform, this.repository,
@required this.stdio, this.stdio,
}) { }) {
argParser.addOption( argParser.addOption(
kIncrement, kIncrement,
...@@ -60,10 +60,10 @@ class RollDevCommand extends Command<void> { ...@@ -60,10 +60,10 @@ class RollDevCommand extends Command<void> {
argParser.addFlag(kYes, negatable: false, abbr: 'y', help: 'Skip the confirmation prompt.'); argParser.addFlag(kYes, negatable: false, abbr: 'y', help: 'Skip the confirmation prompt.');
} }
final Checkouts checkouts;
final FileSystem fileSystem; final FileSystem fileSystem;
final Platform platform; final Platform platform;
final Stdio stdio; final Stdio stdio;
final Repository repository;
@override @override
String get name => 'roll-dev'; String get name => 'roll-dev';
...@@ -76,7 +76,9 @@ class RollDevCommand extends Command<void> { ...@@ -76,7 +76,9 @@ class RollDevCommand extends Command<void> {
void run() { void run() {
rollDev( rollDev(
argResults: argResults, argResults: argResults,
repository: FrameworkRepository(checkouts), fileSystem: fileSystem,
platform: platform,
repository: repository,
stdio: stdio, stdio: stdio,
usage: argParser.usage, usage: argParser.usage,
); );
...@@ -91,7 +93,9 @@ bool rollDev({ ...@@ -91,7 +93,9 @@ bool rollDev({
@required String usage, @required String usage,
@required ArgResults argResults, @required ArgResults argResults,
@required Stdio stdio, @required Stdio stdio,
@required FrameworkRepository repository, @required Platform platform,
@required FileSystem fileSystem,
@required Repository repository,
String remoteName = 'origin', String remoteName = 'origin',
}) { }) {
final String level = argResults[kIncrement] as String; final String level = argResults[kIncrement] as String;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import 'dart:io' as io; import 'dart:io';
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
...@@ -31,15 +31,9 @@ class VerboseStdio extends Stdio { ...@@ -31,15 +31,9 @@ class VerboseStdio extends Stdio {
@required this.stdin, @required this.stdin,
}) : assert(stdout != null), assert(stderr != null), assert(stdin != null); }) : assert(stdout != null), assert(stderr != null), assert(stdin != null);
factory VerboseStdio.local() => VerboseStdio( final Stdout stdout;
stdout: io.stdout, final Stdout stderr;
stderr: io.stderr, final Stdin stdin;
stdin: io.stdin,
);
final io.Stdout stdout;
final io.Stdout stderr;
final io.Stdin stdin;
@override @override
void printError(String message) { void printError(String message) {
......
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:args/command_runner.dart';
import 'package:file/file.dart';
import 'package:file/local.dart';
import 'package:platform/platform.dart';
import 'package:process/process.dart';
import 'package:dev_tools/codesign.dart' show CodesignCommand;
import 'package:dev_tools/globals.dart';
import 'package:dev_tools/repository.dart' show Checkouts;
import './common.dart';
/// Verify all binaries in the Flutter cache are expected by Conductor.
void main() {
test(
'validate the expected binaries from the conductor codesign command are present in the cache',
() async {
const Platform platform = LocalPlatform();
const FileSystem fileSystem = LocalFileSystem();
const ProcessManager processManager = LocalProcessManager();
final TestStdio stdio = TestStdio(verbose: true);
final Checkouts checkouts = Checkouts(
fileSystem: fileSystem,
parentDirectory: localFlutterRoot.parent,
platform: platform,
processManager: processManager,
stdio: stdio,
);
final CommandRunner<void> runner = CommandRunner<void>('codesign-test', '')
..addCommand(
CodesignCommand(checkouts: checkouts, flutterRoot: localFlutterRoot));
try {
await runner.run(<String>[
'codesign',
'--verify',
// Only verify if the correct binaries are in the cache
'--no-signatures',
]);
} on ConductorException catch (e) {
print(fixItInstructions);
fail(e.message);
} on Exception {
print('stdout:\n${stdio.stdout}');
print('stderr:\n${stdio.error}');
rethrow;
}
}, onPlatform: <String, dynamic>{
'windows': const Skip('codesign command is only supported on macos'),
'linux': const Skip('codesign command is only supported on macos'),
});
}
const String fixItInstructions = '''
Codesign integration test failed.
This means that the binary files found in the Flutter cache do not match those
expected by the conductor tool (either an expected file was not found in the
cache or an unexpected file was found in the cache).
This usually happens either during an engine roll or a change to the caching
logic in flutter_tools. If this is a valid change, then the conductor source
code should be updated, specifically either the [binariesWithEntitlements] or
[binariesWithoutEntitlements] lists, depending on if the file should have macOS
entitlements applied during codesigning.
''';
This diff is collapsed.
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
import 'dart:io'; import 'dart:io';
import 'package:file/file.dart';
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf; import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
import 'package:test/test.dart' as test_package show TypeMatcher; import 'package:test/test.dart' as test_package show TypeMatcher;
......
...@@ -7,7 +7,6 @@ import 'package:file/local.dart'; ...@@ -7,7 +7,6 @@ import 'package:file/local.dart';
import 'package:platform/platform.dart'; import 'package:platform/platform.dart';
import 'package:process/process.dart'; import 'package:process/process.dart';
import 'package:dev_tools/globals.dart';
import 'package:dev_tools/roll_dev.dart' show rollDev; import 'package:dev_tools/roll_dev.dart' show rollDev;
import 'package:dev_tools/repository.dart'; import 'package:dev_tools/repository.dart';
import 'package:dev_tools/version.dart'; import 'package:dev_tools/version.dart';
...@@ -23,8 +22,8 @@ void main() { ...@@ -23,8 +22,8 @@ void main() {
const String usageString = 'Usage: flutter conductor.'; const String usageString = 'Usage: flutter conductor.';
Checkouts checkouts; Checkouts checkouts;
FrameworkRepository frameworkUpstream; Repository frameworkUpstream;
FrameworkRepository framework; Repository framework;
setUp(() { setUp(() {
platform = const LocalPlatform(); platform = const LocalPlatform();
...@@ -33,20 +32,22 @@ void main() { ...@@ -33,20 +32,22 @@ void main() {
stdio = TestStdio(verbose: true); stdio = TestStdio(verbose: true);
checkouts = Checkouts( checkouts = Checkouts(
fileSystem: fileSystem, fileSystem: fileSystem,
parentDirectory: localFlutterRoot.parent,
platform: platform, platform: platform,
processManager: processManager, processManager: processManager,
stdio: stdio,
); );
frameworkUpstream = FrameworkRepository(checkouts, localUpstream: true); frameworkUpstream = checkouts.addRepo(
repoType: RepositoryType.framework,
name: 'framework-upstream',
stdio: stdio,
platform: platform,
localUpstream: true,
fileSystem: fileSystem,
useExistingCheckout: false,
);
// This repository has [frameworkUpstream] set as its push/pull remote. // This repository has [frameworkUpstream] set as its push/pull remote.
framework = FrameworkRepository( framework = frameworkUpstream.cloneRepository('test-framework');
checkouts,
name: 'test-framework',
upstream: 'file://${frameworkUpstream.checkoutDirectory.path}/',
);
}); });
test('increment m', () { test('increment m', () {
...@@ -67,6 +68,8 @@ void main() { ...@@ -67,6 +68,8 @@ void main() {
usage: usageString, usage: usageString,
argResults: fakeArgResults, argResults: fakeArgResults,
stdio: stdio, stdio: stdio,
fileSystem: fileSystem,
platform: platform,
repository: framework, repository: framework,
), ),
true, true,
...@@ -104,6 +107,8 @@ void main() { ...@@ -104,6 +107,8 @@ void main() {
usage: usageString, usage: usageString,
argResults: fakeArgResults, argResults: fakeArgResults,
stdio: stdio, stdio: stdio,
fileSystem: fileSystem,
platform: platform,
repository: framework, repository: framework,
), ),
true, true,
......
...@@ -24,7 +24,7 @@ void main() { ...@@ -24,7 +24,7 @@ void main() {
FakeArgResults fakeArgResults; FakeArgResults fakeArgResults;
MemoryFileSystem fileSystem; MemoryFileSystem fileSystem;
TestStdio stdio; TestStdio stdio;
FrameworkRepository repo; Repository repo;
Checkouts checkouts; Checkouts checkouts;
FakePlatform platform; FakePlatform platform;
FakeProcessManager processManager; FakeProcessManager processManager;
...@@ -39,9 +39,12 @@ void main() { ...@@ -39,9 +39,12 @@ void main() {
parentDirectory: fileSystem.directory(checkoutsParentDirectory), parentDirectory: fileSystem.directory(checkoutsParentDirectory),
platform: platform, platform: platform,
processManager: processManager, processManager: processManager,
);
repo = checkouts.addRepo(
platform: platform,
repoType: RepositoryType.framework,
stdio: stdio, stdio: stdio,
); );
repo = FrameworkRepository(checkouts);
}); });
test('returns false if level not provided', () { test('returns false if level not provided', () {
...@@ -53,6 +56,8 @@ void main() { ...@@ -53,6 +56,8 @@ void main() {
expect( expect(
rollDev( rollDev(
argResults: fakeArgResults, argResults: fakeArgResults,
fileSystem: fileSystem,
platform: platform,
repository: repo, repository: repo,
stdio: stdio, stdio: stdio,
usage: usage, usage: usage,
...@@ -70,6 +75,8 @@ void main() { ...@@ -70,6 +75,8 @@ void main() {
expect( expect(
rollDev( rollDev(
argResults: fakeArgResults, argResults: fakeArgResults,
fileSystem: fileSystem,
platform: platform,
repository: repo, repository: repo,
stdio: stdio, stdio: stdio,
usage: usage, usage: usage,
...@@ -85,13 +92,8 @@ void main() { ...@@ -85,13 +92,8 @@ void main() {
'clone', 'clone',
'--', '--',
kUpstreamRemote, kUpstreamRemote,
'${checkoutsParentDirectory}flutter_conductor_checkouts/framework', '${checkoutsParentDirectory}checkouts/framework',
]), ]),
const FakeCommand(command: <String>[
'git',
'rev-parse',
'HEAD',
], stdout: commit),
const FakeCommand(command: <String>[ const FakeCommand(command: <String>[
'git', 'git',
'remote', 'remote',
...@@ -113,6 +115,8 @@ void main() { ...@@ -113,6 +115,8 @@ void main() {
try { try {
rollDev( rollDev(
argResults: fakeArgResults, argResults: fakeArgResults,
fileSystem: fileSystem,
platform: platform,
repository: repo, repository: repo,
stdio: stdio, stdio: stdio,
usage: usage, usage: usage,
...@@ -133,13 +137,8 @@ void main() { ...@@ -133,13 +137,8 @@ void main() {
'clone', 'clone',
'--', '--',
kUpstreamRemote, kUpstreamRemote,
'${checkoutsParentDirectory}flutter_conductor_checkouts/framework', '${checkoutsParentDirectory}checkouts/framework',
]), ]),
const FakeCommand(command: <String>[
'git',
'rev-parse',
'HEAD',
], stdout: commit),
const FakeCommand(command: <String>[ const FakeCommand(command: <String>[
'git', 'git',
'remote', 'remote',
...@@ -188,6 +187,8 @@ void main() { ...@@ -188,6 +187,8 @@ void main() {
rollDev( rollDev(
usage: usage, usage: usage,
argResults: fakeArgResults, argResults: fakeArgResults,
fileSystem: fileSystem,
platform: platform,
repository: repo, repository: repo,
stdio: stdio, stdio: stdio,
), ),
...@@ -205,13 +206,8 @@ void main() { ...@@ -205,13 +206,8 @@ void main() {
'clone', 'clone',
'--', '--',
kUpstreamRemote, kUpstreamRemote,
'${checkoutsParentDirectory}flutter_conductor_checkouts/framework', '${checkoutsParentDirectory}checkouts/framework',
]), ]),
const FakeCommand(command: <String>[
'git',
'rev-parse',
'HEAD',
], stdout: commit),
const FakeCommand(command: <String>[ const FakeCommand(command: <String>[
'git', 'git',
'remote', 'remote',
...@@ -271,6 +267,8 @@ void main() { ...@@ -271,6 +267,8 @@ void main() {
() => rollDev( () => rollDev(
usage: usage, usage: usage,
argResults: fakeArgResults, argResults: fakeArgResults,
fileSystem: fileSystem,
platform: platform,
repository: repo, repository: repo,
stdio: stdio, stdio: stdio,
), ),
...@@ -285,13 +283,8 @@ void main() { ...@@ -285,13 +283,8 @@ void main() {
'clone', 'clone',
'--', '--',
kUpstreamRemote, kUpstreamRemote,
'${checkoutsParentDirectory}flutter_conductor_checkouts/framework', '${checkoutsParentDirectory}checkouts/framework',
]), ]),
const FakeCommand(command: <String>[
'git',
'rev-parse',
'HEAD',
], stdout: commit),
const FakeCommand(command: <String>[ const FakeCommand(command: <String>[
'git', 'git',
'remote', 'remote',
...@@ -340,6 +333,8 @@ void main() { ...@@ -340,6 +333,8 @@ void main() {
() => rollDev( () => rollDev(
usage: usage, usage: usage,
argResults: fakeArgResults, argResults: fakeArgResults,
fileSystem: fileSystem,
platform: platform,
repository: repo, repository: repo,
stdio: stdio, stdio: stdio,
), ),
...@@ -358,13 +353,8 @@ void main() { ...@@ -358,13 +353,8 @@ void main() {
'clone', 'clone',
'--', '--',
kUpstreamRemote, kUpstreamRemote,
'${checkoutsParentDirectory}flutter_conductor_checkouts/framework', '${checkoutsParentDirectory}checkouts/framework',
]), ]),
const FakeCommand(command: <String>[
'git',
'rev-parse',
'HEAD',
], stdout: commit),
const FakeCommand(command: <String>[ const FakeCommand(command: <String>[
'git', 'git',
'remote', 'remote',
...@@ -420,6 +410,8 @@ void main() { ...@@ -420,6 +410,8 @@ void main() {
expect( expect(
() => rollDev( () => rollDev(
argResults: fakeArgResults, argResults: fakeArgResults,
fileSystem: fileSystem,
platform: platform,
repository: repo, repository: repo,
stdio: stdio, stdio: stdio,
usage: usage, usage: usage,
...@@ -435,13 +427,8 @@ void main() { ...@@ -435,13 +427,8 @@ void main() {
'clone', 'clone',
'--', '--',
kUpstreamRemote, kUpstreamRemote,
'${checkoutsParentDirectory}flutter_conductor_checkouts/framework', '${checkoutsParentDirectory}checkouts/framework',
]), ]),
const FakeCommand(command: <String>[
'git',
'rev-parse',
'HEAD',
], stdout: commit),
const FakeCommand(command: <String>[ const FakeCommand(command: <String>[
'git', 'git',
'remote', 'remote',
...@@ -514,6 +501,8 @@ void main() { ...@@ -514,6 +501,8 @@ void main() {
rollDev( rollDev(
usage: usage, usage: usage,
argResults: fakeArgResults, argResults: fakeArgResults,
fileSystem: fileSystem,
platform: platform,
repository: repo, repository: repo,
stdio: stdio, stdio: stdio,
), ),
...@@ -528,13 +517,8 @@ void main() { ...@@ -528,13 +517,8 @@ void main() {
'clone', 'clone',
'--', '--',
kUpstreamRemote, kUpstreamRemote,
'${checkoutsParentDirectory}flutter_conductor_checkouts/framework', '${checkoutsParentDirectory}checkouts/framework',
]), ]),
const FakeCommand(command: <String>[
'git',
'rev-parse',
'HEAD',
], stdout: commit),
const FakeCommand(command: <String>[ const FakeCommand(command: <String>[
'git', 'git',
'remote', 'remote',
...@@ -611,6 +595,8 @@ void main() { ...@@ -611,6 +595,8 @@ void main() {
rollDev( rollDev(
usage: usage, usage: usage,
argResults: fakeArgResults, argResults: fakeArgResults,
fileSystem: fileSystem,
platform: platform,
repository: repo, repository: repo,
stdio: stdio, stdio: stdio,
), ),
...@@ -625,13 +611,8 @@ void main() { ...@@ -625,13 +611,8 @@ void main() {
'clone', 'clone',
'--', '--',
kUpstreamRemote, kUpstreamRemote,
'${checkoutsParentDirectory}flutter_conductor_checkouts/framework', '${checkoutsParentDirectory}checkouts/framework',
]), ]),
const FakeCommand(command: <String>[
'git',
'rev-parse',
'HEAD',
], stdout: commit),
const FakeCommand(command: <String>[ const FakeCommand(command: <String>[
'git', 'git',
'remote', 'remote',
...@@ -703,6 +684,8 @@ void main() { ...@@ -703,6 +684,8 @@ void main() {
expect( expect(
rollDev( rollDev(
argResults: fakeArgResults, argResults: fakeArgResults,
fileSystem: fileSystem,
platform: platform,
repository: repo, repository: repo,
stdio: stdio, stdio: stdio,
usage: usage, usage: usage,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment