[tests] Add .NET versions of xcframeworks-test and bindings-xcframework-test. (#12420)
This commit is contained in:
Родитель
2b1a5c12f4
Коммит
1b5cb35623
|
@ -0,0 +1 @@
|
|||
include ../shared.mk
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0-maccatalyst</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Imports of the form '../shared.csproj' will be inlined by xharness -->
|
||||
<Import Project="../shared.csproj" />
|
||||
|
||||
<ItemGroup>
|
||||
<!-- this empty item group is here for xharness -->
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1 @@
|
|||
include ../shared.mk
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0-ios</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Imports of the form '../shared.csproj' will be inlined by xharness -->
|
||||
<Import Project="../shared.csproj" />
|
||||
|
||||
<ItemGroup>
|
||||
<!-- this empty item group is here for xharness -->
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1 @@
|
|||
include ../shared.mk
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0-macos</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Imports of the form '../shared.csproj' will be inlined by xharness -->
|
||||
<Import Project="../shared.csproj" />
|
||||
|
||||
<ItemGroup>
|
||||
<!-- this empty item group is here for xharness -->
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,51 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<IsBindingProject>true</IsBindingProject>
|
||||
<NoBindingEmbedding>true</NoBindingEmbedding>
|
||||
<DefineConstants>$(DefineConstants);NET</DefineConstants>
|
||||
<DefineConstants>$(DefineConstants);NET;XCFRAMEWORK;FRAMEWORK_TEST</DefineConstants>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<RootNamespace>bindingstest</RootNamespace>
|
||||
<SignAssembly>True</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\..\..\..\product.snk</AssemblyOriginatorKeyFile>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<AssemblyName>bindings-framework-test</AssemblyName>
|
||||
|
||||
<RootTestsDirectory>$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\..\..\..'))</RootTestsDirectory>
|
||||
<TestLibrariesDirectory>$(RootTestsDirectory)\test-libraries</TestLibrariesDirectory>
|
||||
<BindingsFrameworkDirectory>$(RootTestsDirectory)\bindings-framework-test</BindingsFrameworkDirectory>
|
||||
|
||||
<!-- Don't remove native symbols, because it makes debugging native crashes harder -->
|
||||
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
|
||||
|
||||
<DefineConstants Condition="'$(Configuration)' == 'Debug'">$(DefineConstants);DEBUG</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(RootTestsDirectory)/common/shared-dotnet.csproj" />
|
||||
|
||||
<ItemGroup>
|
||||
<ObjcBindingApiDefinition Include="$(BindingsFrameworkDirectory)/ApiDefinition.cs" />
|
||||
<ObjcBindingCoreSource Include="$(BindingsFrameworkDirectory)/StructsAndEnums.cs" />
|
||||
|
||||
<None Include="$(TestLibrariesDirectory)\libframework.m">
|
||||
<Link>libframework.m</Link>
|
||||
</None>
|
||||
<None Include="$(TestLibrariesDirectory)\libframework.h">
|
||||
<Link>libframework.h</Link>
|
||||
</None>
|
||||
<TestLibrariesInput Include="$(TestLibrariesDirectory)\libframework.m" />
|
||||
<TestLibrariesOutput Include="$(TestLibrariesDirectory)\.libs\XTest.xcframework" />
|
||||
|
||||
<NativeReference Include="$(TestLibrariesDirectory)\.libs\XTest.xcframework">
|
||||
<Kind>Framework</Kind>
|
||||
<SmartLink>False</SmartLink>
|
||||
<Frameworks>CoreLocation ModelIO</Frameworks>
|
||||
</NativeReference>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="BuildTestLibraries" Inputs="@(TestLibrariesInput)" Outputs="@(TestLibrariesOutput)" BeforeTargets="BeforeBuild">
|
||||
<Exec Command="make -j8 -C $(TestLibrariesDirectory)" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -0,0 +1,22 @@
|
|||
TOP=../../../..
|
||||
include $(TOP)/Make.config
|
||||
include $(TOP)/mk/colors.mk
|
||||
|
||||
prepare:
|
||||
$(Q) $(MAKE) -C $(TOP)/tests/dotnet copy-dotnet-config
|
||||
|
||||
reload:
|
||||
$(Q) rm -Rf $(TOP)/tests/dotnet/packages
|
||||
$(Q) $(MAKE) -C $(TOP) -j8 all
|
||||
$(Q) $(MAKE) -C $(TOP) -j8 install
|
||||
$(Q) git clean -xfdq
|
||||
|
||||
reload-and-build:
|
||||
$(Q) $(MAKE) reload
|
||||
$(Q) $(MAKE) build
|
||||
|
||||
build: prepare
|
||||
$(Q) $(DOTNET6) build /bl *.csproj $(MSBUILD_VERBOSITY) $(BUILD_ARGUMENTS)
|
||||
|
||||
diag: prepare
|
||||
$(Q) $(DOTNET6) build /v:diag msbuild.binlog
|
|
@ -0,0 +1 @@
|
|||
include ../shared.mk
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0-tvos</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Imports of the form '../shared.csproj' will be processed by xharness -->
|
||||
<Import Project="../shared.csproj" />
|
||||
|
||||
<ItemGroup>
|
||||
<!-- this empty item group is here for xharness -->
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,14 @@
|
|||
<?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>CFBundleDisplayName</key>
|
||||
<string>xcframework-test</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.xamarin.xcframework-test</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>xcframework-test</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.15</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1 @@
|
|||
include ../shared.mk
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0-maccatalyst</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Imports of the form '../shared.csproj' will be inlined by xharness -->
|
||||
<Import Project="../shared.csproj" />
|
||||
|
||||
<ItemGroup>
|
||||
<!-- this empty item group is here for xharness -->
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,8 @@
|
|||
TOP=../../..
|
||||
include $(TOP)/Make.config
|
||||
|
||||
build-all:
|
||||
for platform in $(DOTNET_PLATFORMS); do \
|
||||
echo "Building in $$platform"; \
|
||||
$(MAKE) -C "$$platform" build; \
|
||||
done
|
|
@ -0,0 +1,14 @@
|
|||
<?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>CFBundleDisplayName</key>
|
||||
<string>xcframework-test</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.xamarin.xcframework-test</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>xcframework-test</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>10.0</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,2 @@
|
|||
include ../shared.mk
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0-ios</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Imports of the form '../shared.csproj' will be inlined by xharness -->
|
||||
<Import Project="../shared.csproj" />
|
||||
|
||||
<ItemGroup>
|
||||
<!-- this empty item group is here for xharness -->
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,14 @@
|
|||
<?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>CFBundleDisplayName</key>
|
||||
<string>xcframework-test</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.xamarin.xcframework-test</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>xcframework-test</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.14</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1 @@
|
|||
include ../shared.mk
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0-macos</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Imports of the form '../shared.csproj' will be inlined by xharness -->
|
||||
<Import Project="../shared.csproj" />
|
||||
|
||||
<ItemGroup>
|
||||
<!-- this empty item group is here for xharness -->
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<DefineConstants>$(DefineConstants);NET</DefineConstants>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<RootNamespace>xcframeworktest</RootNamespace>
|
||||
|
||||
<RootTestsDirectory>$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\..\..\..'))</RootTestsDirectory>
|
||||
<TestLibrariesDirectory>$(RootTestsDirectory)\test-libraries</TestLibrariesDirectory>
|
||||
<FrameworkTestDirectory>$(RootTestsDirectory)\xcframework-test</FrameworkTestDirectory>
|
||||
|
||||
<!-- Don't remove native symbols, because it makes debugging native crashes harder -->
|
||||
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
|
||||
|
||||
<DefineConstants Condition="'$(Configuration)' == 'Debug'">$(DefineConstants);DEBUG</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(RootTestsDirectory)/common/shared-dotnet.csproj" />
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NUnitLite" Version="3.12.0" />
|
||||
<ProjectReference Include="$(RootTestsDirectory)\..\external\Touch.Unit\Touch.Client\dotnet\$(_PlatformName)\Touch.Client-$(_PlatformName).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" />
|
||||
|
||||
<ProjectReference Include="$(RootTestsDirectory)\bindings-xcframework-test\dotnet\$(_PlatformName)\bindings-xcframework-test.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<BundleResource Include="$(FrameworkTestDirectory)\iOS\Resources\Default-568h%402x.png">
|
||||
<Link>Resources\Default-568h%402x.png</Link>
|
||||
</BundleResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="$(FrameworkTestDirectory)\iOS\AppDelegate.cs" Condition="!$(TargetFramework.EndsWith('-macos'))" />
|
||||
<Compile Include="$(FrameworkTestDirectory)\iOS\XCFrameworkTests.cs" />
|
||||
<Compile Include="$(RootTestsDirectory)\common\mac\MacMain.cs" Condition="$(TargetFramework.EndsWith('-macos'))" Link="MacMain.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(RootTestsDirectory)\nunit.framework.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,29 @@
|
|||
TOP=../../../..
|
||||
include $(TOP)/Make.config
|
||||
include $(TOP)/mk/colors.mk
|
||||
|
||||
prepare:
|
||||
$(Q) $(MAKE) -C $(TOP)/tests/dotnet copy-dotnet-config
|
||||
|
||||
reload:
|
||||
$(Q) rm -Rf $(TOP)/tests/dotnet/packages
|
||||
$(Q) $(MAKE) -C $(TOP) -j8 all
|
||||
$(Q) $(MAKE) -C $(TOP) -j8 install
|
||||
$(Q) git clean -xfdq
|
||||
|
||||
reload-and-build:
|
||||
$(Q) $(MAKE) reload
|
||||
$(Q) $(MAKE) build
|
||||
|
||||
reload-and-run:
|
||||
$(Q) $(MAKE) reload
|
||||
$(Q) $(MAKE) run
|
||||
|
||||
build: prepare
|
||||
$(Q) $(DOTNET6) build /bl *.csproj $(MSBUILD_VERBOSITY) $(BUILD_ARGUMENTS)
|
||||
|
||||
run: prepare
|
||||
$(Q) $(DOTNET6) build /bl *.csproj $(MSBUILD_VERBOSITY) $(BUILD_ARGUMENTS) -t:Run
|
||||
|
||||
diag: prepare
|
||||
$(Q) $(DOTNET6) build /v:diag msbuild.binlog
|
|
@ -0,0 +1,14 @@
|
|||
<?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>CFBundleDisplayName</key>
|
||||
<string>xcframework-test</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.xamarin.xcframework-test</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>xcframework-test</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>10.0</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1 @@
|
|||
include ../shared.mk
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0-tvos</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Imports of the form '../shared.csproj' will be processed by xharness -->
|
||||
<Import Project="../shared.csproj" />
|
||||
|
||||
<ItemGroup>
|
||||
<!-- this empty item group is here for xharness -->
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -395,6 +395,26 @@ namespace Xharness {
|
|||
TestPlatform = TestPlatform.MacCatalyst,
|
||||
});
|
||||
|
||||
// xcframework-test
|
||||
|
||||
MacTestProjects.Add (new MacTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "xcframework-test", "dotnet", "macOS", "xcframework-test.csproj"))) {
|
||||
Name = "xcframework-test",
|
||||
IsDotNetProject = true,
|
||||
TargetFrameworkFlavors = MacFlavors.DotNet,
|
||||
Platform = "AnyCPU",
|
||||
Ignore = !ENABLE_DOTNET,
|
||||
TestPlatform = TestPlatform.Mac,
|
||||
});
|
||||
|
||||
MacTestProjects.Add (new MacTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "xcframework-test", "dotnet", "MacCatalyst", "xcframework-test.csproj"))) {
|
||||
Name = "xcframework-test",
|
||||
IsDotNetProject = true,
|
||||
TargetFrameworkFlavors = MacFlavors.MacCatalyst,
|
||||
Platform = "AnyCPU",
|
||||
Ignore = !ENABLE_DOTNET,
|
||||
TestPlatform = TestPlatform.MacCatalyst,
|
||||
});
|
||||
|
||||
var monoImportTestFactory = new BCLTestImportTargetFactory (this);
|
||||
MacTestProjects.AddRange (monoImportTestFactory.GetMacBclTargets ());
|
||||
|
||||
|
@ -528,6 +548,10 @@ namespace Xharness {
|
|||
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "framework-test", "dotnet", "iOS", "framework-test.csproj"))) { Name = "framework-test", IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = false, SkipiOS32Variation = true, SkipMacCatalystVariation = true, TestPlatform = TestPlatform.iOS_Unified, });
|
||||
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "framework-test", "dotnet", "tvOS", "framework-test.csproj"))) { Name = "framework-test", IsDotNetProject = true, SkipiOSVariation = true, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = false, SkipiOS32Variation = true, GenerateVariations = false, TestPlatform = TestPlatform.tvOS, });
|
||||
|
||||
// xcframework-test
|
||||
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "xcframework-test", "dotnet", "iOS", "xcframework-test.csproj"))) { Name = "xcframework-test", IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = false, SkipiOS32Variation = true, SkipMacCatalystVariation = true, TestPlatform = TestPlatform.iOS_Unified, });
|
||||
IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "xcframework-test", "dotnet", "tvOS", "xcframework-test.csproj"))) { Name = "xcframework-test", IsDotNetProject = true, SkipiOSVariation = true, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = false, SkipiOS32Variation = true, GenerateVariations = false, TestPlatform = TestPlatform.tvOS, });
|
||||
|
||||
foreach (var flavor in new MonoNativeFlavor [] { MonoNativeFlavor.Compat, MonoNativeFlavor.Unified }) {
|
||||
var monoNativeInfo = new MonoNativeInfo (DevicePlatform.iOS, flavor, RootDirectory, Log);
|
||||
var iosTestProject = new iOSTestProject (monoNativeInfo.ProjectPath) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче