[tests] Port monotouch-test to .NET. (#9452)

* Create a .NET version of the monotouch-test project.
* Make sure it builds and launches (there are test failures, and it eventually
  crashes, which will be fixed in a later PR).
* Add it to xharness, in a way that it's possible to run monotouch-test
  locally, while at the same time it'll never run on the bots (because it's
  not green yet).
This commit is contained in:
Rolf Bjarne Kvinge 2020-08-24 08:24:36 +02:00 коммит произвёл GitHub
Родитель d3ea2c3a81 04866dd0b7
Коммит 9d30e6e135
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
10 изменённых файлов: 258 добавлений и 22 удалений

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

@ -7,6 +7,7 @@
// Copyright 2017 Microsoft
//
#if !NET // OpenTK-1.0.dll not yet supported for .NET
#if !__WATCHOS__ && !MONOMAC
using System;
@ -40,3 +41,4 @@ namespace MonoTouchFixtures.OpenGLES
}
#endif // !__WATCHOS__
#endif // !NET

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

@ -0,0 +1,217 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.iOS.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<RuntimeIdentifier>ios-x64</RuntimeIdentifier>
<OutputType>Exe</OutputType>
<DefineConstants>NET</DefineConstants>
<LangVersion>latest</LangVersion>
<RootNamespace>monotouchtest</RootNamespace>
<AssemblyName>monotouchtest</AssemblyName>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\..\..\product.snk</AssemblyOriginatorKeyFile>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<CodesignEntitlements>..\..\Entitlements.plist</CodesignEntitlements>
<AssetTargetFallback>xamarinios10;$(AssetTargetFallback)</AssetTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NUnitLite" Version="3.12.0" />
<PackageReference Include="MonoTouch.Dialog" Version="2.0.0-pre1" />
<ProjectReference Include="..\..\..\..\external\Touch.Unit\Touch.Client\dotnet\iOS\Touch.Client-iOS.dotnet.csproj" />
<!-- MonoTouch.Dialog references System.Json, which isn't shipped with .NET5, so reference the NuGet instead -->
<PackageReference Include="System.Json" Version="4.7.1" />
<!-- The linker resolves some assembly references too eagerly, and fails when it can't find them, so work around this by referencing the missing assemblies-->
<!-- ref: https://github.com/mono/linker/issues/1139 -->
<PackageReference Include="System.Security.Permissions" Version="5.0.0-preview.2.20160.6" />
<PackageReference Include="System.Threading.AccessControl" Version="5.0.0-preview.2.20160.6" />
<PackageReference Include="System.CodeDom" Version="5.0.0-preview.2.20160.6" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0-preview.2.20160.6" />
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="5.0.0-preview.2.20160.6" />
<PackageReference Include="System.Diagnostics.EventLog" Version="5.0.0-preview.2.20160.6" />
<PackageReference Include="System.IO.Ports" Version="5.0.0-preview.2.20160.6" />
<PackageReference Include="System.Data.SqlClient" Version="5.0.0-alpha1.19523.8" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\Info.plist">
<LogicalName>Info.plist</LogicalName>
</None>
<None Include="..\..\Entitlements.plist" />
<None Include="..\..\app.config" />
<None Include="..\..\EmptyNib.xib" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\**\*.cs" Exclude="$(DefaultItemExcludes);..\..\obj\**;..\..\dotnet\**">
<Link>%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\..\..\..\tests\test-libraries\TrampolineTest.generated.cs" />
<Compile Include="..\..\..\..\tests\test-libraries\RegistrarTest.generated.cs" />
<Compile Include="..\..\..\..\builds\mono-ios-sdk-destdir\ios-sources\mcs\class\System.Drawing\Test\System.Drawing\TestPoint.cs">
<Link>System.Drawing\TestPoint.cs</Link>
</Compile>
<Compile Include="..\..\..\..\builds\mono-ios-sdk-destdir\ios-sources\mcs\class\System.Drawing\Test\System.Drawing\TestPointF.cs">
<Link>System.Drawing\TestPointF.cs</Link>
</Compile>
<Compile Include="..\..\..\..\builds\mono-ios-sdk-destdir\ios-sources\mcs\class\System.Drawing\Test\System.Drawing\TestRectangle.cs">
<Link>System.Drawing\TestRectangle.cs</Link>
</Compile>
<Compile Include="..\..\..\..\builds\mono-ios-sdk-destdir\ios-sources\mcs\class\System.Drawing\Test\System.Drawing\TestRectangleF.cs">
<Link>System.Drawing\TestRectangleF.cs</Link>
</Compile>
<Compile Include="..\..\..\..\builds\mono-ios-sdk-destdir\ios-sources\mcs\class\System.Drawing\Test\System.Drawing\TestSize.cs">
<Link>System.Drawing\TestSize.cs</Link>
</Compile>
<Compile Include="..\..\..\..\builds\mono-ios-sdk-destdir\ios-sources\mcs\class\System.Drawing\Test\System.Drawing\TestSizeF.cs">
<Link>System.Drawing\TestSizeF.cs</Link>
</Compile>
<Compile Include="..\..\..\api-shared\ObjCRuntime\RegistrarTest.cs">
<Link>shared\ObjCRuntime\RegistrarTest.cs</Link>
</Compile>
<Compile Include="..\..\..\api-shared\CoreFoundation\CFNotificationCenterTest.cs">
<Link>CoreFoundation\CFNotificationCenterTest.cs</Link>
</Compile>
<Compile Include="..\..\..\common\TestRuntime.cs">
<Link>TestRuntime.cs</Link>
</Compile>
<Compile Include="..\..\..\common\ConditionalCompilation.cs">
<Link>ConditionalCompilation.cs</Link>
</Compile>
<Compile Include="..\..\..\common\Extensions.cs">
<Link>Extensions.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\AudioToolbox\1.caf">
<Link>AudioToolbox\1.caf</Link>
</Content>
<Content Include="..\..\Tamarin.pdf">
<Link>Tamarin.pdf</Link>
</Content>
<Content Include="..\..\basn3p08.png">
<Link>basn3p08.png</Link>
</Content>
<Content Include="..\..\BoardingPass.pkpass">
<Link>BoardingPass.pkpass</Link>
</Content>
<Content Include="..\..\Hand.wav">
<Link>Hand.wav</Link>
</Content>
<Content Include="..\..\Pacifico.ttf">
<Link>Pacifico.ttf</Link>
</Content>
<Content Include="..\..\LL-171A-B-B797E457-16AB-C708-1E0F-32C19DBD47B5.icc">
<Link>LL-171A-B-B797E457-16AB-C708-1E0F-32C19DBD47B5.icc</Link>
</Content>
<Content Include="..\..\drum01.mp3">
<Link>drum01.mp3</Link>
</Content>
<Content Include="..\..\Model3.arobject">
<Link>Model3.arobject</Link>
</Content>
<Content Include="..\..\access-denied.html">
<Link>access-denied.html</Link>
</Content>
<Content Include="..\..\access-granted.html">
<Link>access-granted.html</Link>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\EmbeddedResources\dotnet\iOS\EmbeddedResources.csproj" />
<ProjectReference Include="..\..\..\..\tests\bindings-test\dotnet\iOS\bindings-test.csproj" />
<ProjectReference Include="..\..\..\fsharplibrary\dotnet\iOS\fsharplibrary.fsproj" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="..\..\CoreImage\Xam.png">
<Link>CoreImage\Xam.png</Link>
</BundleResource>
<BundleResource Include="..\..\Resources\xamarin0.png">
<Link>Resources\xamarin0.png</Link>
</BundleResource>
<BundleResource Include="..\..\Resources\xamarin1.png">
<Link>Resources\xamarin1.png</Link>
</BundleResource>
<BundleResource Include="..\..\Resources\xamarin2.png">
<Link>Resources\xamarin2.png</Link>
</BundleResource>
<BundleResource Include="..\..\xamvideotest.mp4">
<Link>xamvideotest.mp4</Link>
</BundleResource>
<BundleResource Include="..\..\CoreImage\xamarinmonkey.heic">
<Link>CoreImage\xamarinmonkey.heic</Link>
</BundleResource>
<BundleResource Include="..\..\Resources\Base.lproj\Localizable.strings">
<Link>Resources\Base.lproj\Localizable.strings</Link>
</BundleResource>
<BundleResource Include="..\..\Resources\metal-sample.metal">
<Link>Resources\metal-sample.metal</Link>
</BundleResource>
<BundleResource Include="..\..\Resources\fragmentShader.metal">
<Link>Resources\fragmentShader.metal</Link>
</BundleResource>
<BundleResource Include="..\..\uncompressed.txt">
<Link>uncompressed.txt</Link>
</BundleResource>
<BundleResource Include="..\..\compressed_lze">
<Link>compressed_lze</Link>
</BundleResource>
<BundleResource Include="..\..\compressed_lz4">
<Link>compressed_lz4</Link>
</BundleResource>
<BundleResource Include="..\..\compressed_lzma">
<Link>compressed_lzma</Link>
</BundleResource>
<BundleResource Include="..\..\compressed_zip">
<Link>compressed_zip</Link>
</BundleResource>
<BundleResource Include="..\..\example.pac">
<Link>example.pac</Link>
</BundleResource>
<BundleResource Include="..\..\Resources\square.gif">
<Link>Resources\square.gif</Link>
</BundleResource>
</ItemGroup>
<ItemGroup>
<Metal Include="..\..\Resources\metal-sample.metal" Condition="'$(_SdkIsSimulator)' != 'true'">
<Link>Resources\metal-sample.metal</Link>
</Metal>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\..\Security\openssl_crt.der">
<LogicalName>monotouchtest.Security.openssl_crt.der</LogicalName>
</EmbeddedResource>
</ItemGroup>
<PropertyGroup>
<TestLibrariesDirectory>..\..\..\..\tests\test-libraries</TestLibrariesDirectory>
</PropertyGroup>
<ItemGroup>
<GeneratedTestInput Include="$(TestLibrariesDirectory)\*.m" />
<GeneratedTestInput Include="$(TestLibrariesDirectory)\*.h" />
<GeneratedTestInput Include="$(TestLibrariesDirectory)\*.cs" />
<GeneratedTestInput Include="$(TestLibrariesDirectory)\Makefile" />
<GeneratedTestOutput Include="$(TestLibrariesDirectory)\TrampolineTest.generated.cs" />
<GeneratedTestOutput Include="$(TestLibrariesDirectory)\RegistrarTest.generated.cs" />
<CustomMetalSmeltingInput Include="..\..\Resources\fragmentShader.metal" />
</ItemGroup>
<Target Name="CustomMetalSmelting" Inputs="@(CustomMetalSmeltingInput)" Outputs="$(_AppBundlePath)\fragmentShader.metallib" Condition="'$(_SdkIsSimulator)' != 'true'" DependsOnTargets="_GenerateBundleName">
<PropertyGroup>
<_SmeltingSdk Condition="'$(_PlatformName)' == 'iOS'">iphoneos</_SmeltingSdk>
<_SmeltingSdk Condition="'$(_PlatformName)' == 'tvOS'">appletvos</_SmeltingSdk>
<_SmeltingMinOS Condition="'$(_PlatformName)' == 'iOS'">-mios-version-min=11.0</_SmeltingMinOS>
<_SmeltingMinOS Condition="'$(_PlatformName)' == 'tvOS'">-mtvos-version-min=11.0</_SmeltingMinOS>
</PropertyGroup>
<MakeDir Directories="$(IntermediateOutputPath);$(AppBundleDir)" />
<Exec Command="xcrun -sdk $(_SmeltingSdk) metal -c @(CustomMetalSmeltingInput) -o $(IntermediateOutputPath)\fragmentShader.air $(_SmeltingMinOS)" />
<Exec Command="xcrun -sdk $(_SmeltingSdk) metallib $(IntermediateOutputPath)\fragmentShader.air -o $(AppBundleDir)\fragmentShader.metallib" />
</Target>
<Target Name="BeforeBuild" Inputs="@(GeneratedTestInput)" Outputs="@(GeneratedTestOutput)" DependsOnTargets="CustomMetalSmelting" >
<Exec Command="make -j8 -C $(TestLibrariesDirectory)" />
</Target>
</Project>

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

@ -10,6 +10,7 @@
// Copyright 2018 Xamarin Inc. All rights reserved.
//
#if !NET // WeakAttribute is not supported in .NET
using System;
using System.Threading;
@ -141,3 +142,4 @@ namespace MonoTouchFixtures {
int x;
}
}
#endif // !NET

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

@ -8,6 +8,7 @@
// Copyright 2018 Xamarin Inc. All rights reserved.
//
#if !NET // WeakAttribute is not supported in .NET
using System;
using Foundation;
@ -137,3 +138,4 @@ namespace MonoTouchFixtures {
public void RemoveStrongRef () => strong = null;
}
}
#endif // !NET

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

@ -391,6 +391,7 @@ namespace Xharness {
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "interdependent-binding-projects", "dotnet", "iOS", "interdependent-binding-projects.csproj"))) { Name = "interdependent-binding-projects", IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = true, SkipiOS32Variation = true, });
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "introspection", "iOS", "introspection-ios.csproj"))) { Name = "introspection" });
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "introspection", "iOS", "introspection-ios-dotnet.csproj"))) { Name = "introspection", IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = false, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = true, SkipiOS32Variation = true, });
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "monotouch-test", "dotnet", "iOS", "monotouch-test.csproj"))) { Name = "monotouch-test", IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = true, SkipiOS32Variation = true, Ignore = true, });
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "dont link", "dont link.csproj"))) { Configurations = new string [] { "Debug", "Release" } });
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "link all", "link all.csproj"))) { Configurations = new string [] { "Debug", "Release" } });
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "link sdk", "link sdk.csproj"))) { Configurations = new string [] { "Debug", "Release" } });

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

@ -22,7 +22,7 @@ namespace Xharness.Jenkins {
if (project.SkipDeviceVariations)
continue;
bool ignored = !jenkins.IncludeDevice;
bool ignored = project.Ignore ?? !jenkins.IncludeDevice;
if (!jenkins.IsIncluded (project))
ignored = true;

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

@ -20,7 +20,7 @@ namespace Xharness.Jenkins {
if (!project.IsExecutableProject)
continue;
bool ignored = !jenkins.IncludeSimulator;
bool ignored = project.Ignore ?? !jenkins.IncludeSimulator;
if (!jenkins.IsIncluded (project))
ignored = true;

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

@ -32,6 +32,7 @@ namespace Xharness.Jenkins {
// 32-bit interpreter doesn't work yet: https://github.com/mono/mono/issues/9871
var supports_interpreter = test.Platform != TestPlatform.iOS_Unified32;
var supports_dynamic_registrar_on_device = test.Platform == TestPlatform.iOS_Unified64 || test.Platform == TestPlatform.tvOS;
var ignore = test.TestProject.Ignore;
switch (test.ProjectPlatform) {
case "iPhone":
@ -41,10 +42,10 @@ namespace Xharness.Jenkins {
/* we don't add --assembly-build-target=@all=staticobject because that's the default in all our test projects */
if (supports_debug) {
yield return new TestData { Variation = "AssemblyBuildTarget: dylib (debug)", MTouchExtraArgs = $"--assembly-build-target=@all=dynamiclibrary {test.TestProject.MTouchExtraArgs}", Debug = true, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Dynamic };
yield return new TestData { Variation = "AssemblyBuildTarget: SDK framework (debug)", MTouchExtraArgs = $"--assembly-build-target=@sdk=framework=Xamarin.Sdk --assembly-build-target=@all=staticobject {test.TestProject.MTouchExtraArgs}", Debug = true, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static };
yield return new TestData { Variation = "AssemblyBuildTarget: dylib (debug, profiling)", MTouchExtraArgs = $"--assembly-build-target=@all=dynamiclibrary {test.TestProject.MTouchExtraArgs}", Debug = true, Profiling = true, MonoNativeLinkMode = MonoNativeLinkMode.Dynamic };
yield return new TestData { Variation = "AssemblyBuildTarget: SDK framework (debug, profiling)", MTouchExtraArgs = $"--assembly-build-target=@sdk=framework=Xamarin.Sdk --assembly-build-target=@all=staticobject {test.TestProject.MTouchExtraArgs}", Debug = true, Profiling = true, MonoNativeLinkMode = MonoNativeLinkMode.Static };
yield return new TestData { Variation = "AssemblyBuildTarget: dylib (debug)", MTouchExtraArgs = $"--assembly-build-target=@all=dynamiclibrary {test.TestProject.MTouchExtraArgs}", Debug = true, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Dynamic, Ignored = test.TestProject.Ignore };
yield return new TestData { Variation = "AssemblyBuildTarget: SDK framework (debug)", MTouchExtraArgs = $"--assembly-build-target=@sdk=framework=Xamarin.Sdk --assembly-build-target=@all=staticobject {test.TestProject.MTouchExtraArgs}", Debug = true, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static, Ignored = test.TestProject.Ignore };
yield return new TestData { Variation = "AssemblyBuildTarget: dylib (debug, profiling)", MTouchExtraArgs = $"--assembly-build-target=@all=dynamiclibrary {test.TestProject.MTouchExtraArgs}", Debug = true, Profiling = true, MonoNativeLinkMode = MonoNativeLinkMode.Dynamic, Ignored = test.TestProject.Ignore };
yield return new TestData { Variation = "AssemblyBuildTarget: SDK framework (debug, profiling)", MTouchExtraArgs = $"--assembly-build-target=@sdk=framework=Xamarin.Sdk --assembly-build-target=@all=staticobject {test.TestProject.MTouchExtraArgs}", Debug = true, Profiling = true, MonoNativeLinkMode = MonoNativeLinkMode.Static, Ignored = test.TestProject.Ignore };
}
if (test.ProjectConfiguration.Contains ("Debug"))
@ -56,18 +57,18 @@ namespace Xharness.Jenkins {
switch (test.TestName) {
case "monotouch-test":
if (supports_dynamic_registrar_on_device)
yield return new TestData { Variation = "Debug (dynamic registrar)", MTouchExtraArgs = "--registrar:dynamic", Debug = true, Profiling = false };
yield return new TestData { Variation = "Release (all optimizations)", MTouchExtraArgs = "--registrar:static --optimize:all", Debug = false, Profiling = false, Defines = "OPTIMIZEALL" };
yield return new TestData { Variation = "Debug (dynamic registrar)", MTouchExtraArgs = "--registrar:dynamic", Debug = true, Profiling = false, Ignored = test.TestProject.Ignore };
yield return new TestData { Variation = "Release (all optimizations)", MTouchExtraArgs = "--registrar:static --optimize:all", Debug = false, Profiling = false, Defines = "OPTIMIZEALL", Ignored = test.TestProject.Ignore };
if (supports_debug) {
yield return new TestData { Variation = "Debug (all optimizations)", MTouchExtraArgs = "--registrar:static --optimize:all", Debug = true, Profiling = false, Defines = "OPTIMIZEALL" };
yield return new TestData { Variation = "Debug: SGenConc", MTouchExtraArgs = "", Debug = true, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static, EnableSGenConc = true};
yield return new TestData { Variation = "Debug (all optimizations)", MTouchExtraArgs = "--registrar:static --optimize:all", Debug = true, Profiling = false, Defines = "OPTIMIZEALL", Ignored = test.TestProject.Ignore };
yield return new TestData { Variation = "Debug: SGenConc", MTouchExtraArgs = "", Debug = true, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static, EnableSGenConc = true, Ignored = test.TestProject.Ignore };
}
if (supports_interpreter) {
if (supports_debug) {
yield return new TestData { Variation = "Debug (interpreter)", MTouchExtraArgs = "--interpreter", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME" };
yield return new TestData { Variation = "Debug (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME" };
yield return new TestData { Variation = "Debug (interpreter)", MTouchExtraArgs = "--interpreter", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME", Ignored = test.TestProject.Ignore };
yield return new TestData { Variation = "Debug (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME", Ignored = test.TestProject.Ignore };
}
yield return new TestData { Variation = "Release (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = false, Profiling = false, Undefines = "FULL_AOT_RUNTIME" };
yield return new TestData { Variation = "Release (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = false, Profiling = false, Undefines = "FULL_AOT_RUNTIME", Ignored = test.TestProject.Ignore };
}
break;
case string name when name.StartsWith ("mscorlib", StringComparison.Ordinal):
@ -87,10 +88,10 @@ namespace Xharness.Jenkins {
switch (test.TestName) {
case "monotouch-test":
// The default is to run monotouch-test with the dynamic registrar (in the simulator), so that's already covered
yield return new TestData { Variation = "Debug (LinkSdk)", Debug = true, Profiling = false, LinkMode = "LinkSdk" };
yield return new TestData { Variation = "Debug (static registrar)", MTouchExtraArgs = "--registrar:static", Debug = true, Profiling = false, Undefines = "DYNAMIC_REGISTRAR" };
yield return new TestData { Variation = "Release (all optimizations)", MTouchExtraArgs = "--registrar:static --optimize:all", Debug = false, Profiling = false, LinkMode = "Full", Defines = "OPTIMIZEALL", Undefines = "DYNAMIC_REGISTRAR" };
yield return new TestData { Variation = "Debug (all optimizations)", MTouchExtraArgs = "--registrar:static --optimize:all,-remove-uithread-checks", Debug = true, Profiling = false, LinkMode = "Full", Defines = "OPTIMIZEALL", Undefines = "DYNAMIC_REGISTRAR", Ignored = !jenkins.IncludeAll };
yield return new TestData { Variation = "Debug (LinkSdk)", Debug = true, Profiling = false, LinkMode = "LinkSdk", Ignored = test.TestProject.Ignore };
yield return new TestData { Variation = "Debug (static registrar)", MTouchExtraArgs = "--registrar:static", Debug = true, Profiling = false, Undefines = "DYNAMIC_REGISTRAR", Ignored = test.TestProject.Ignore };
yield return new TestData { Variation = "Release (all optimizations)", MTouchExtraArgs = "--registrar:static --optimize:all", Debug = false, Profiling = false, LinkMode = "Full", Defines = "OPTIMIZEALL", Undefines = "DYNAMIC_REGISTRAR", Ignored = test.TestProject.Ignore };
yield return new TestData { Variation = "Debug (all optimizations)", MTouchExtraArgs = "--registrar:static --optimize:all,-remove-uithread-checks", Debug = true, Profiling = false, LinkMode = "Full", Defines = "OPTIMIZEALL", Undefines = "DYNAMIC_REGISTRAR", Ignored = test.TestProject.Ignore ?? !jenkins.IncludeAll };
break;
case "introspection":
if (test.TestProject.IsDotNetProject)

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

@ -28,6 +28,7 @@ namespace Microsoft.DotNet.XHarness.iOS.Shared {
public bool RestoreNugetsInProject = true;
public string MTouchExtraArgs;
public double TimeoutMultiplier = 1;
public bool? Ignore;
public IEnumerable<TestProject> ProjectReferences;
@ -66,6 +67,7 @@ namespace Microsoft.DotNet.XHarness.iOS.Shared {
rv.Name = Name;
rv.MTouchExtraArgs = MTouchExtraArgs;
rv.TimeoutMultiplier = TimeoutMultiplier;
rv.Ignore = Ignore;
return rv;
}

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

@ -958,14 +958,23 @@ namespace Microsoft.DotNet.XHarness.iOS.Shared.Utilities {
{
"MtouchExtraArgs",
};
Func<string, string> convert = (input) =>
Func<string, string> convert = null;
convert = (input) =>
{
if (input.IndexOf (';') >= 0) {
var split = input.Split (new char [] { ';' }, StringSplitOptions.RemoveEmptyEntries);
for (var i = 0; i < split.Length; i++)
split [i] = convert (split [i]);
return string.Join (";", split);
}
if (input [0] == '/')
return input; // This is already a full path.
if (input.StartsWith ("$(MSBuildExtensionsPath)", StringComparison.Ordinal))
return input; // This is already a full path.
if (input.StartsWith ("$(MSBuildBinPath)", StringComparison.Ordinal))
return input; // This is already a full path.
// Don't process anything that starts with a variable, it's either a full path already, or the variable will be updated according to the new location
if (input.StartsWith ("$(", StringComparison.Ordinal))
return input;
input = input.Replace ('\\', '/'); // make unix-style
if (rootDirectory != null)