Unverified Commit a3b9e20a authored by stuartmorgan's avatar stuartmorgan Committed by GitHub

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

parent 1d395c5e
...@@ -23,8 +23,6 @@ const List<String> _kLinuxArtifacts = <String>[ ...@@ -23,8 +23,6 @@ const List<String> _kLinuxArtifacts = <String>[
'flutter_glfw.h', 'flutter_glfw.h',
// GTK. Not yet used by the template. // GTK. Not yet used by the template.
'libflutter_linux_gtk.so', 'libflutter_linux_gtk.so',
// Shared.
'icudtl.dat',
]; ];
const String _kLinuxDepfile = 'linux_engine_sources.d'; const String _kLinuxDepfile = 'linux_engine_sources.d';
...@@ -86,6 +84,10 @@ class UnpackLinux extends Target { ...@@ -86,6 +84,10 @@ class UnpackLinux extends Target {
outputDirectory: outputDirectory, outputDirectory: outputDirectory,
artifacts: _kLinuxArtifacts, artifacts: _kLinuxArtifacts,
clientSourcePaths: <String>[clientSourcePath, headersPath], clientSourcePaths: <String>[clientSourcePath, headersPath],
icuDataPath: environment.artifacts.getArtifactPath(
Artifact.icuData,
platform: TargetPlatform.linux_x64,
)
); );
final DepfileService depfileService = DepfileService( final DepfileService depfileService = DepfileService(
fileSystem: environment.fileSystem, fileSystem: environment.fileSystem,
......
...@@ -1392,7 +1392,11 @@ const List<List<String>> _windowsDesktopBinaryDirs = <List<String>>[ ...@@ -1392,7 +1392,11 @@ const List<List<String>> _windowsDesktopBinaryDirs = <List<String>>[
const List<List<String>> _linuxDesktopBinaryDirs = <List<String>>[ const List<List<String>> _linuxDesktopBinaryDirs = <List<String>>[
<String>['linux-x64', 'linux-x64/linux-x64-flutter-glfw.zip'], <String>['linux-x64', 'linux-x64/linux-x64-flutter-glfw.zip'],
<String>['linux-x64', 'linux-x64/flutter-cpp-client-wrapper-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', '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>>[ const List<List<String>> _macOSDesktopBinaryDirs = <List<String>>[
......
...@@ -36,6 +36,11 @@ void main() { ...@@ -36,6 +36,11 @@ void main() {
mode: anyNamed('mode'), mode: anyNamed('mode'),
platform: anyNamed('platform'), platform: anyNamed('platform'),
)).thenReturn('linux-x64/flutter_linux'); )).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( final Environment testEnvironment = Environment.test(
fileSystem.currentDirectory, fileSystem.currentDirectory,
......
...@@ -611,6 +611,19 @@ void main() { ...@@ -611,6 +611,19 @@ void main() {
expect(artifacts.getBinaryDirs(), isNotEmpty); 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 { class FakeCachedArtifact extends EngineCachedArtifact {
......
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