Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
a7f7687a
Unverified
Commit
a7f7687a
authored
Mar 05, 2021
by
Jenn Magder
Committed by
GitHub
Mar 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete unzipped FlutterMacOS.framework before replacing artifact (#77316)
parent
fcc0042d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
cache.dart
packages/flutter_tools/lib/src/cache.dart
+1
-0
cache_test.dart
packages/flutter_tools/test/general.shard/cache_test.dart
+27
-0
No files found.
packages/flutter_tools/lib/src/cache.dart
View file @
a7f7687a
...
...
@@ -934,6 +934,7 @@ abstract class EngineCachedArtifact extends CachedArtifact {
final
File
frameworkZip
=
fileSystem
.
file
(
fileSystem
.
path
.
join
(
dir
.
path
,
'FlutterMacOS.framework.zip'
));
if
(
frameworkZip
.
existsSync
())
{
final
Directory
framework
=
fileSystem
.
directory
(
fileSystem
.
path
.
join
(
dir
.
path
,
'FlutterMacOS.framework'
));
ErrorHandlingFileSystem
.
deleteIfExists
(
framework
,
recursive:
true
);
framework
.
createSync
();
operatingSystemUtils
.
unzip
(
frameworkZip
,
framework
);
}
...
...
packages/flutter_tools/test/general.shard/cache_test.dart
View file @
a7f7687a
...
...
@@ -308,6 +308,33 @@ void main() {
verify
(
operatingSystemUtils
.
chmod
(
argThat
(
hasPath
(
dir
.
path
)),
'a+r,a+x'
));
});
testWithoutContext
(
'EngineCachedArtifact removes unzipped FlutterMacOS.framework before replacing'
,
()
async
{
final
OperatingSystemUtils
operatingSystemUtils
=
MockOperatingSystemUtils
();
final
MockCache
cache
=
MockCache
();
final
FileSystem
fileSystem
=
MemoryFileSystem
.
test
();
final
Directory
artifactDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'flutter_cache_test_artifact.'
);
final
Directory
downloadDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'flutter_cache_test_download.'
);
when
(
cache
.
getArtifactDirectory
(
any
)).
thenReturn
(
artifactDir
);
when
(
cache
.
getDownloadDir
()).
thenReturn
(
downloadDir
);
final
Directory
binDir
=
artifactDir
.
childDirectory
(
'bin_dir'
)..
createSync
();
binDir
.
childFile
(
'FlutterMacOS.framework.zip'
).
createSync
();
final
Directory
unzippedFramework
=
binDir
.
childDirectory
(
'FlutterMacOS.framework'
);
final
File
staleFile
=
unzippedFramework
.
childFile
(
'stale_file'
)..
createSync
(
recursive:
true
);
artifactDir
.
childFile
(
'unused_url_path'
).
createSync
();
final
FakeCachedArtifact
artifact
=
FakeCachedArtifact
(
cache:
cache
,
binaryDirs:
<
List
<
String
>>[
<
String
>[
'bin_dir'
,
'unused_url_path'
],
],
requiredArtifacts:
DevelopmentArtifact
.
universal
,
);
await
artifact
.
updateInner
(
MockArtifactUpdater
(),
fileSystem
,
operatingSystemUtils
);
expect
(
unzippedFramework
,
exists
);
expect
(
staleFile
,
isNot
(
exists
));
});
testWithoutContext
(
'IosUsbArtifacts verifies executables for libimobiledevice in isUpToDateInner'
,
()
async
{
final
FileSystem
fileSystem
=
MemoryFileSystem
.
test
();
final
Cache
cache
=
Cache
.
test
(
fileSystem:
fileSystem
,
processManager:
FakeProcessManager
.
any
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment