Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions build-tools/mono-runtimes/ProfileAssemblies.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
5 changes: 5 additions & 0 deletions build-tools/mono-runtimes/mono-runtimes.targets
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
22 changes: 16 additions & 6 deletions tests/Xamarin.Android.Bcl-Tests/Xamarin.Android.Bcl-Tests.targets
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down