mirror of
https://github.com/flutter/flutter
synced 2024-08-28 04:21:14 +00:00
[devicelab] measure entire release folder size, zipped (#115597)
This commit is contained in:
parent
78390a086d
commit
75a0a72555
|
@ -1513,19 +1513,18 @@ class CompileTest {
|
|||
watch.start();
|
||||
await flutter('build', options: options);
|
||||
watch.stop();
|
||||
final String basename = path.basename(cwd);
|
||||
final String exePath = path.join(
|
||||
final String buildPath = path.join(
|
||||
cwd,
|
||||
'build',
|
||||
'windows',
|
||||
'runner',
|
||||
'release',
|
||||
'$basename.exe');
|
||||
final File exe = file(exePath);
|
||||
);
|
||||
// On Windows, we do not produce a single installation package file,
|
||||
// rather a directory containing an .exe and .dll files.
|
||||
// The release size is set to the size of the produced .exe file
|
||||
releaseSizeInBytes = exe.lengthSync();
|
||||
// rather a directory containing an .exe and .dll files. Zip them all
|
||||
// together to get an approximate release size.
|
||||
await exec('tar.exe', <String>['-zcf', 'build/app.tar.gz', buildPath]);
|
||||
releaseSizeInBytes = file('build/app.tar.gz').lengthSync();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue