[Mono.Android-Tests] Fix stat(1) arguments on Linux (#801)
macOS uses *BSD command-line tools which often take different parameters than the Linux ones. This is the case with **stat**(1) which not only expects different command line parameters but also has different meaning of various format placeholders (in this case `%z` means "file size in bytes" on macOS but "file time stamp timezone in human readable format"). This fixes **stat**(1) invocation on Linux.
This commit is contained in:
Родитель
6b54d6dd26
Коммит
79989b7c3c
|
@ -16,7 +16,8 @@
|
|||
</ItemGroup>
|
||||
<Target Name="_RecordApkSizes" AfterTargets="DeployUnitTestApks">
|
||||
<Delete Files="$(MSBuildThisFileDirectory)..\..\..\TestResult-Mono.Android_Tests-values.csv" Condition=" '$(Configuration)' == 'Debug' " />
|
||||
<Exec Command="stat -f "stat: %z %N" "$(_MonoAndroidTestApkFile)" > $(_MonoAndroidTestApkSizesInput)" />
|
||||
<Exec Condition=" '$(HostOS)' == 'Darwin' " Command="stat -f "stat: %z %N" "$(_MonoAndroidTestApkFile)" > $(_MonoAndroidTestApkSizesInput)" />
|
||||
<Exec Condition=" '$(HostOS)' == 'Linux' " Command="stat -c "stat: %s %N" "$(_MonoAndroidTestApkFile)" > $(_MonoAndroidTestApkSizesInput)" />
|
||||
<Exec Command="unzip -l "$(_MonoAndroidTestApkFile)" >> $(_MonoAndroidTestApkSizesInput)" />
|
||||
<ProcessPlotInput InputFilename="$(_MonoAndroidTestApkSizesInput)" ApplicationPackageName="$(_MonoAndroidTestPackage)" ResultsFilename="$(MSBuildThisFileDirectory)..\..\..\TestResult-Mono.Android_Tests.xml" DefinitionsFilename="$(MSBuildThisFileDirectory)apk-sizes-definitions-$(Configuration)$(_AotName).txt" AddResults="true" />
|
||||
</Target>
|
||||
|
|
Загрузка…
Ссылка в новой задаче