Preparation for the new test runner (#1174)

Context: https://github.com/xamarin/xamarin-android/pull/1075

PR #1075 keeps rebuilding all the Mono runtimes because of the
`build-tools/mono-runtimes/*` changes -- which invalidate the bundle
hash (97f08f78) -- which means the entire world needs to be rebuilt,
which is *very slow* (7+ hours per build).

This is getting quite tiresome.

Split out the `build-tools/mono-runtimes` changes from PR #1075
so that a new bundle can be built *and cached*, which will speed
up subsequent PR #1075 builds.
This commit is contained in:
Marek Habersack 2018-01-10 04:26:39 +01:00 коммит произвёл Jonathan Pryor
Родитель 4c516b6dd3
Коммит a30382867a
3 изменённых файлов: 29 добавлений и 6 удалений

Просмотреть файл

@ -192,6 +192,10 @@
<MonoTestAssembly Include="monodroid_corlib_test.dll">
<SourcePath>corlib</SourcePath>
</MonoTestAssembly>
<MonoTestAssembly Include="monodroid_corlib_xunit-test.dll">
<SourcePath>corlib</SourcePath>
<TestType>xunit</TestType>
</MonoTestAssembly>
<MonoTestAssembly Include="monodroid_I18N.CJK_test.dll">
<SourcePath>I18N/CJK</SourcePath>
</MonoTestAssembly>
@ -237,6 +241,10 @@
<MonoTestAssembly Include="monodroid_System.Numerics_test.dll">
<SourcePath>System.Numerics</SourcePath>
</MonoTestAssembly>
<MonoTestAssembly Include="monodroid_System.Numerics_xunit-test.dll">
<SourcePath>System.Numerics</SourcePath>
<TestType>xunit</TestType>
</MonoTestAssembly>
<MonoTestAssembly Include="monodroid_System.Runtime.Serialization_test.dll">
<SourcePath>System.Runtime.Serialization</SourcePath>
</MonoTestAssembly>

Просмотреть файл

@ -310,6 +310,11 @@
IgnoreStandardErrorWarningFormat="True"
WorkingDirectory="$(IntermediateOutputPath)\%(_MonoRuntime.Identity)\runtime"
/>
<Exec
Condition=" '%(MonoTestAssembly.TestType)' == 'xunit' "
Command="make -C $(MonoSourceFullPath)\mcs\class\%(MonoTestAssembly.SourcePath) xunit-test-local"
WorkingDirectory="$(MonoSourceFullPath)"
/>
<Copy
SourceFiles="@(_BclTestAssemblySource)"
DestinationFiles="@(_BclTestAssemblyDestination)"

Просмотреть файл

@ -5,20 +5,29 @@
<Import Project="Xamarin.Android.Bcl-Tests.projitems" />
<Import Project="..\..\build-tools\scripts\TestApks.targets" />
<Import Project="..\..\build-tools\mono-runtimes\ProfileAssemblies.projitems" />
<Target Name="_GetNUnitAssemblies">
<ItemGroup>
<_NUnitAssembly
Condition=" '%(MonoTestAssembly.TestType)' != 'xunit' "
Include="@(MonoTestAssembly)"
/>
</ItemGroup>
</Target>
<Target Name="_AddTestAssemblies"
DependsOnTargets="_RemapAssemblies"
BeforeTargets="ResolveAssemblyReferences">
<ItemGroup>
<Reference Include="@(MonoTestAssembly->'$(IntermediateOutputPath)%(Identity)')" />
<Reference Include="@(_NUnitAssembly->'$(IntermediateOutputPath)%(Identity)')" />
<Reference Remove="$(IntermediateOutputPath)nunitlite.dll" />
</ItemGroup>
</Target>
<Target Name="_RemapAssemblies"
Inputs="@(MonoTestAssembly->'..\..\bin\$(Configuration)\bcl-tests\%(Identity)')"
Outputs="@(MonoTestAssembly->'$(IntermediateOutputPath)%(Identity)')">
DependsOnTargets="_GetNUnitAssemblies"
Inputs="@(_NUnitAssembly->'..\..\bin\$(Configuration)\bcl-tests\%(Identity)')"
Outputs="@(_NUnitAssembly->'$(IntermediateOutputPath)%(Identity)')">
<MakeDir Directories="$(IntermediateOutputPath)" />
<ItemGroup>
<_Source Include="@(MonoTestAssembly->'..\..\bin\$(Configuration)\bcl-tests\%(Identity)')" />
<_Source Include="@(_NUnitAssembly->'..\..\bin\$(Configuration)\bcl-tests\%(Identity)')" />
</ItemGroup>
<ResolveAssemblyReference
Assemblies="Xamarin.Android.NUnitLite"
@ -67,11 +76,12 @@
<Touch Files="@(_TestResource)" />
</Target>
<Target Name="_GenerateApp_cs"
Inputs="@(MonoTestAssembly->'..\..\bin\$(Configuration)\bcl-tests\%(Identity)')"
DependsOnTargets="_GetNUnitAssemblies"
Inputs="@(_NUnitAssembly->'..\..\bin\$(Configuration)\bcl-tests\%(Identity)')"
Outputs="$(IntermediateOutputPath)\App.cs">
<MakeDir Directories="$(IntermediateOutputPath)" />
<PropertyGroup>
<_Assemblies>@(MonoTestAssembly->'"%(Identity)"', ', ')</_Assemblies>
<_Assemblies>@(_NUnitAssembly->'"%(Identity)"', ', ')</_Assemblies>
</PropertyGroup>
<ReplaceFileContents
SourceFile="App.cs.in"