[tests] Add a .NET version of introspection for Mac Catalyst. (#12039)

* [tests] Add a .NET version of introspection for Mac Catalyst.

It shows a lot of failures (so it's disabled by default), but this way we can
at least start to fix the failures.

* [xharness] Always ignore the new test.

* [xharness] Ignored projects should be ignored.
This commit is contained in:
Rolf Bjarne Kvinge 2021-07-28 09:39:29 +02:00 коммит произвёл GitHub
Родитель c202ba4a93
Коммит 2ca8970122
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 198 добавлений и 1 удалений

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

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>com.xamarin.introspection</string>
<key>CFBundleName</key>
<string>introspection</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<key>NSAppleMusicUsageDescription</key>
<string>Testing tastes</string>
<key>NSHomeKitUsageDescription</key>
<string>Testing roofs</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Testing lens</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcons.appiconset</string>
</dict>
</plist>

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

@ -0,0 +1 @@
include ../shared.mk

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

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-maccatalyst</TargetFramework>
<RuntimeIdentifier>maccatalyst-x64</RuntimeIdentifier>
<OutputType>Exe</OutputType>
<DefineConstants>NET</DefineConstants>
<LangVersion>latest</LangVersion>
<RootNamespace>Introspection</RootNamespace>
<AssemblyName>introspection</AssemblyName>
<MtouchLink>None</MtouchLink>
<AssetTargetFallback>xamarinios10;$(AssetTargetFallback)</AssetTargetFallback>
<!-- This is needed because the packages/ directory might be in the same folder as this project file, and some some packages might have C# files, which would then automatically be included -->
<DefaultItemExcludes>$(DefaultItemExcludes);packages/**;</DefaultItemExcludes>
<EnableDefaultItems>false</EnableDefaultItems>
</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\MacCatalyst\Touch.Client-MacCatalyst.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" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\iOS\Main.cs" />
<Compile Include="..\..\iOS\AppDelegate.cs" />
<Compile Include="..\..\iOS\iOSApiCtorInitTest.cs" />
<Compile Include="..\..\iOS\iOSApiFieldTest.cs" />
<Compile Include="..\..\iOS\iOSApiSelectorTest.cs" />
<Compile Include="..\..\iOS\iOSApiSignatureTest.cs" />
<Compile Include="..\..\iOS\iOSApiProtocolTest.cs" />
<Compile Include="..\..\iOS\iOSApiWeakPropertyTest.cs" />
<Compile Include="..\..\iOS\iOSApiPInvokeTest.cs" />
<Compile Include="..\..\iOS\iOSApiClassPtrTest.cs" />
<Compile Include="..\..\iOS\iOSApiTypoTest.cs" />
<Compile Include="..\..\iOS\iOSCoreImageFiltersTest.cs" />
<Compile Include="..\..\ApiBaseTest.cs">
<Link>ApiBaseTest.cs</Link>
</Compile>
<Compile Include="..\..\ApiClassPtrTest.cs">
<Link>ApiClassPtrTest.cs</Link>
</Compile>
<Compile Include="..\..\ApiCMAttachmentTest.cs">
<Link>ApiCMAttachmentTest.cs</Link>
</Compile>
<Compile Include="..\..\ApiCoreImageFiltersTest.cs">
<Link>ApiCoreImageFiltersTest.cs</Link>
</Compile>
<Compile Include="..\..\ApiCtorInitTest.cs">
<Link>ApiCtorInitTest.cs</Link>
</Compile>
<Compile Include="..\..\ApiFieldTest.cs">
<Link>ApiFieldTest.cs</Link>
</Compile>
<Compile Include="..\..\ApiPInvokeTest.cs">
<Link>ApiPInvokeTest.cs</Link>
</Compile>
<Compile Include="..\..\ApiProtocolTest.cs">
<Link>ApiProtocolTest.cs</Link>
</Compile>
<Compile Include="..\..\ApiSelectorTest.cs">
<Link>ApiSelectorTest.cs</Link>
</Compile>
<Compile Include="..\..\ApiSignatureTest.cs">
<Link>ApiSignatureTest.cs</Link>
</Compile>
<Compile Include="..\..\ApiStructTest.cs">
<Link>ApiStructTest.cs</Link>
</Compile>
<Compile Include="..\..\ApiTypoTest.cs">
<Link>ApiTypoTest.cs</Link>
</Compile>
<Compile Include="..\..\ApiWeakPropertyTest.cs">
<Link>ApiWeakPropertyTest.cs</Link>
</Compile>
<Compile Include="..\..\CoreSelectorTest.cs">
<Link>CoreSelectorTest.cs</Link>
</Compile>
<Compile Include="..\..\EnvironmentVariable.cs">
<Link>EnvironmentVariable.cs</Link>
</Compile>
<Compile Include="..\..\..\common\MonoNativeConfig.cs">
<Link>MonoNativeConfig.cs</Link>
</Compile>
<Compile Include="..\..\..\common\PlatformInfo.cs">
<Link>PlatformInfo.cs</Link>
</Compile>
<Compile Include="..\..\..\common\TestRuntime.cs">
<Link>TestRuntime.cs</Link>
</Compile>
<Compile Include="..\..\ApiAvailabilityTest.cs">
<Link>ApiAvailabilityTest.cs</Link>
</Compile>
<Compile Include="..\..\..\..\tools\common\Frameworks.cs">
<Link>Frameworks.cs</Link>
</Compile>
<Compile Include="..\..\..\..\tools\common\ApplePlatform.cs">
<Link>ApplePlatform.cs</Link>
</Compile>
<Compile Include="..\..\..\..\tools\common\SdkVersions.cs">
<Link>SdkVersions.cs</Link>
</Compile>
<Compile Include="..\..\ApiFrameworkTest.cs">
<Link>ApiFrameworkTest.cs</Link>
</Compile>
<Compile Include="..\..\ApiTypeTest.cs">
<Link>ApiTypeTest.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="..\..\iOS\LaunchScreen.storyboard" Condition="'$(TargetFrameworkIdentifier)' != 'Xamarin.WatchOS'" />
</ItemGroup>
<ItemGroup>
<ImageAsset Condition="'$(TargetFrameworkIdentifier)' != 'Xamarin.WatchOS'" Include="..\..\iOS\Assets.xcassets\AppIcons.appiconset\Contents.json" />
<ImageAsset Condition="'$(TargetFrameworkIdentifier)' != 'Xamarin.WatchOS'" Include="..\..\iOS\Assets.xcassets\AppIcons.appiconset\Icon-app-60%403x.png" />
<ImageAsset Condition="'$(TargetFrameworkIdentifier)' != 'Xamarin.WatchOS'" Include="..\..\iOS\Assets.xcassets\AppIcons.appiconset\icon-app-57.png" />
<ImageAsset Condition="'$(TargetFrameworkIdentifier)' != 'Xamarin.WatchOS'" Include="..\..\iOS\Assets.xcassets\AppIcons.appiconset\icon-app-57%402x.png" />
<ImageAsset Condition="'$(TargetFrameworkIdentifier)' != 'Xamarin.WatchOS'" Include="..\..\iOS\Assets.xcassets\AppIcons.appiconset\icon-app-60%402x.png" />
<ImageAsset Condition="'$(TargetFrameworkIdentifier)' != 'Xamarin.WatchOS'" Include="..\..\iOS\Assets.xcassets\AppIcons.appiconset\icon-app-72.png" />
<ImageAsset Condition="'$(TargetFrameworkIdentifier)' != 'Xamarin.WatchOS'" Include="..\..\iOS\Assets.xcassets\AppIcons.appiconset\icon-app-72%402x.png" />
<ImageAsset Condition="'$(TargetFrameworkIdentifier)' != 'Xamarin.WatchOS'" Include="..\..\iOS\Assets.xcassets\AppIcons.appiconset\icon-app-76.png" />
<ImageAsset Condition="'$(TargetFrameworkIdentifier)' != 'Xamarin.WatchOS'" Include="..\..\iOS\Assets.xcassets\AppIcons.appiconset\icon-app-76%402x.png" />
<ImageAsset Condition="'$(TargetFrameworkIdentifier)' != 'Xamarin.WatchOS'" Include="..\..\iOS\Assets.xcassets\AppIcons.appiconset\icon-app-83.5%402x.png" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="..\..\xamarin1.png">
<Link>xamarin1.png</Link>
</BundleResource>
<BundleResource Include="..\..\..\..\tools\mtouch\simlauncher64-sgen.frameworks">
<Link>simlauncher64-sgen.frameworks</Link>
</BundleResource>
</ItemGroup>
</Project>

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

@ -0,0 +1,12 @@
TOP=../../../..
include $(TOP)/Make.config
prepare:
$(MAKE) -C $(TOP)/tests/dotnet copy-dotnet-config
build: prepare
$(DOTNET6) build /bl *.csproj $(MSBUILD_VERBOSITY)
run: prepare
$(DOTNET6) build /bl *.csproj $(MSBUILD_VERBOSITY) /t:Run

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

@ -292,6 +292,14 @@ namespace Xharness {
});
}
MacTestProjects.Add (new MacTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "introspection", "dotnet", "MacCatalyst", "introspection.csproj"))) {
Name = "introspection",
IsDotNetProject = true,
TargetFrameworkFlavors = MacFlavors.MacCatalyst,
Platform = "AnyCPU",
Ignore = true /* always ignored for now, it has known failures */,
});
MacTestProjects.Add (new MacTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "monotouch-test", "dotnet", "macOS", "monotouch-test.csproj"))) {
Name = "monotouch-test",
IsDotNetProject = true,
@ -446,7 +454,7 @@ namespace Xharness {
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "interdependent-binding-projects", "interdependent-binding-projects.csproj"))) { Name = "interdependent-binding-projects" });
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 = false, SkipiOS32Variation = true, });
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "introspection", "iOS", "introspection-ios.csproj"))) { Name = "introspection", IgnoreMacCatalystVariation = false });
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "introspection", "dotnet", "iOS", "introspection.csproj"))) { Name = "introspection", IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = false, SkipiOS32Variation = true, });
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "introspection", "dotnet", "iOS", "introspection.csproj"))) { Name = "introspection", IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = false, SkipiOS32Variation = true, SkipMacCatalystVariation = true, });
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "introspection", "dotnet", "tvOS", "introspection.csproj"))) { Name = "introspection", IsDotNetProject = true, SkipiOSVariation = true, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = false, SkipiOS32Variation = true, GenerateVariations = false, TestPlatform = TestPlatform.tvOS, });
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 = false, SkipiOS32Variation = true, GenerateVariations = false, TestPlatform = TestPlatform.iOS_Unified, });
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "monotouch-test", "dotnet", "tvOS", "monotouch-test.csproj"))) { Name = "monotouch-test", IsDotNetProject = true, SkipiOSVariation = true, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = false, SkipiOS32Variation = true, GenerateVariations = false, TestPlatform = TestPlatform.tvOS, });

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

@ -66,6 +66,9 @@ namespace Xharness.Jenkins {
foreach (var project in jenkins.Harness.MacTestProjects) {
bool ignored = !jenkins.IncludeMac;
if (project.Ignore == true)
ignored = true;
if (!jenkins.IncludeMmpTest && project.Path.Contains ("mmptest"))
ignored = true;