Fix non-local-engine Linux release builds (#58372)

This commit is contained in:
stuartmorgan 2020-06-01 11:03:02 -07:00 committed by GitHub
parent 1d395c5e18
commit a3b9e20a6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 2 deletions

View file

@ -23,8 +23,6 @@ const List<String> _kLinuxArtifacts = <String>[
'flutter_glfw.h',
// GTK. Not yet used by the template.
'libflutter_linux_gtk.so',
// Shared.
'icudtl.dat',
];
const String _kLinuxDepfile = 'linux_engine_sources.d';
@ -86,6 +84,10 @@ class UnpackLinux extends Target {
outputDirectory: outputDirectory,
artifacts: _kLinuxArtifacts,
clientSourcePaths: <String>[clientSourcePath, headersPath],
icuDataPath: environment.artifacts.getArtifactPath(
Artifact.icuData,
platform: TargetPlatform.linux_x64,
)
);
final DepfileService depfileService = DepfileService(
fileSystem: environment.fileSystem,

View file

@ -1392,7 +1392,11 @@ const List<List<String>> _windowsDesktopBinaryDirs = <List<String>>[
const List<List<String>> _linuxDesktopBinaryDirs = <List<String>>[
<String>['linux-x64', 'linux-x64/linux-x64-flutter-glfw.zip'],
<String>['linux-x64', 'linux-x64/flutter-cpp-client-wrapper-glfw.zip'],
<String>['linux-x64-profile', 'linux-x64-profile/linux-x64-flutter-glfw.zip'],
<String>['linux-x64-release', 'linux-x64-release/linux-x64-flutter-glfw.zip'],
<String>['linux-x64', 'linux-x64/linux-x64-flutter-gtk.zip'],
<String>['linux-x64-profile', 'linux-x64-profile/linux-x64-flutter-gtk.zip'],
<String>['linux-x64-release', 'linux-x64-release/linux-x64-flutter-gtk.zip'],
];
const List<List<String>> _macOSDesktopBinaryDirs = <List<String>>[

View file

@ -36,6 +36,11 @@ void main() {
mode: anyNamed('mode'),
platform: anyNamed('platform'),
)).thenReturn('linux-x64/flutter_linux');
when(mockArtifacts.getArtifactPath(
Artifact.icuData,
mode: anyNamed('mode'),
platform: anyNamed('platform'),
)).thenReturn(r'linux-x64/icudtl.dat');
final Environment testEnvironment = Environment.test(
fileSystem.currentDirectory,

View file

@ -611,6 +611,19 @@ void main() {
expect(artifacts.getBinaryDirs(), isNotEmpty);
});
testWithoutContext('Linux desktop artifacts include profile and release artifacts', () {
final MockCache mockCache = MockCache();
final LinuxEngineArtifacts artifacts = LinuxEngineArtifacts(
mockCache,
platform: FakePlatform(operatingSystem: 'linux'),
);
expect(artifacts.getBinaryDirs(), containsAll(<Matcher>[
contains(contains('profile')),
contains(contains('release')),
]));
});
}
class FakeCachedArtifact extends EngineCachedArtifact {