Re-enable codesign integration test (#85507)
This commit is contained in:
parent
425c37da38
commit
67e4aeb602
@ -284,7 +284,7 @@ class CodesignCommand extends Command<void> {
|
||||
// First print all deviations from expectations
|
||||
if (unsignedBinaries.isNotEmpty) {
|
||||
stdio.printError('Found ${unsignedBinaries.length} unsigned binaries:');
|
||||
unsignedBinaries.forEach(print);
|
||||
unsignedBinaries.forEach(stdio.printError);
|
||||
}
|
||||
|
||||
if (wrongEntitlementBinaries.isNotEmpty) {
|
||||
|
@ -50,23 +50,7 @@ Directory get localFlutterRoot {
|
||||
const FileSystem fileSystem = LocalFileSystem();
|
||||
const Platform platform = LocalPlatform();
|
||||
|
||||
// If a test
|
||||
if (platform.script.scheme == 'data') {
|
||||
final RegExp pattern = RegExp(
|
||||
r'(file:\/\/[^"]*[/\\]dev\/conductor[/\\][^"]+\.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();
|
||||
}
|
||||
filePath = platform.script.toFilePath();
|
||||
final String checkoutsDirname = fileSystem.path.normalize(
|
||||
fileSystem.path.join(
|
||||
fileSystem.path.dirname(filePath),
|
||||
|
@ -31,9 +31,13 @@ void main() {
|
||||
stdio: stdio,
|
||||
);
|
||||
|
||||
final Directory flutterRoot = _flutterRootFromDartBinary(
|
||||
fileSystem.file(platform.executable),
|
||||
);
|
||||
|
||||
final CommandRunner<void> runner = CommandRunner<void>('codesign-test', '')
|
||||
..addCommand(
|
||||
CodesignCommand(checkouts: checkouts, flutterRoot: localFlutterRoot));
|
||||
CodesignCommand(checkouts: checkouts, flutterRoot: flutterRoot));
|
||||
|
||||
try {
|
||||
await runner.run(<String>[
|
||||
@ -44,7 +48,7 @@ void main() {
|
||||
]);
|
||||
} on ConductorException catch (e) {
|
||||
print(stdio.error);
|
||||
print(fixItInstructions);
|
||||
print(_fixItInstructions);
|
||||
fail(e.message);
|
||||
} on Exception {
|
||||
print('stdout:\n${stdio.stdout}');
|
||||
@ -54,10 +58,17 @@ void main() {
|
||||
}, onPlatform: <String, dynamic>{
|
||||
'windows': const Skip('codesign command is only supported on macos'),
|
||||
'linux': const Skip('codesign command is only supported on macos'),
|
||||
}, skip: 'TODO(christopherfujino): https://github.com/flutter/flutter/issues/83448');
|
||||
});
|
||||
}
|
||||
|
||||
const String fixItInstructions = '''
|
||||
Directory _flutterRootFromDartBinary(File dartBinary) {
|
||||
final Directory flutterDartSdkDir = dartBinary.parent.parent;
|
||||
final Directory flutterCache = flutterDartSdkDir.parent;
|
||||
final Directory flutterSdkDir = flutterCache.parent.parent;
|
||||
return flutterSdkDir;
|
||||
}
|
||||
|
||||
const String _fixItInstructions = '''
|
||||
Codesign integration test failed.
|
||||
|
||||
This means that the binary files found in the Flutter cache do not match those
|
||||
|
Loading…
x
Reference in New Issue
Block a user