forked from firka/flutter
Build/copy macOS frameworks to built products instead of ephemeral directory (#72378)
This commit is contained in:
@@ -44,13 +44,17 @@ void main() {
|
||||
});
|
||||
|
||||
testUsingContext('Copies files to correct cache directory', () async {
|
||||
final Directory outputDir = fileSystem.directory('output');
|
||||
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
||||
const FakeCommand(
|
||||
FakeCommand(
|
||||
command: <String>[
|
||||
'cp',
|
||||
'-R',
|
||||
'rsync',
|
||||
'-av',
|
||||
'--delete',
|
||||
'--filter',
|
||||
'- .DS_Store/',
|
||||
'Artifact.flutterMacOSFramework.debug',
|
||||
'/FlutterMacOS.framework',
|
||||
outputDir.path,
|
||||
],
|
||||
),
|
||||
]);
|
||||
@@ -65,19 +69,10 @@ void main() {
|
||||
processManager: processManager,
|
||||
logger: BufferLogger.test(),
|
||||
fileSystem: fileSystem,
|
||||
engineVersion: '2'
|
||||
engineVersion: '2',
|
||||
outputDir: outputDir,
|
||||
);
|
||||
|
||||
final Directory cacheDirectory = fileSystem.directory(
|
||||
artifacts.getArtifactPath(
|
||||
Artifact.flutterMacOSFramework,
|
||||
mode: BuildMode.debug,
|
||||
))
|
||||
..createSync();
|
||||
cacheDirectory.childFile('dummy').createSync();
|
||||
environment.buildDir.createSync(recursive: true);
|
||||
environment.outputDir.createSync(recursive: true);
|
||||
|
||||
await const DebugUnpackMacOS().build(environment);
|
||||
|
||||
expect(processManager.hasRemainingExpectations, false);
|
||||
|
||||
Reference in New Issue
Block a user