[Mac][Tests] Change the MacTestRunner project type to XamMac
This commit is contained in:
Родитель
34805bff60
Коммит
415e9e57db
|
@ -1,5 +1,12 @@
|
|||
<?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/>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.MacTestRunner</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.12</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>true</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{0017C823-67F6-4DFA-8C2C-E23CD1E33D8F}</ProjectGuid>
|
||||
<ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<ProjectGuid>{3A01E7BF-BB41-46AC-B04A-201935F2CA99}</ProjectGuid>
|
||||
<ProjectTypeGuids>{A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>MacTestRunner</RootNamespace>
|
||||
<MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
|
||||
<AssemblyName>MacTestRunner</AssemblyName>
|
||||
<SuppressXamMacMigration>True</SuppressXamMacMigration>
|
||||
<SuppressXamMacUpsell>True</SuppressXamMacUpsell>
|
||||
<UseXamMacFullFramework>true</UseXamMacFullFramework>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TestRunnerCommand>bin\MacTestRunner.app</TestRunnerCommand>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
|
@ -76,16 +76,11 @@
|
|||
<Reference Include="nunit-console-runner">
|
||||
<HintPath>..\packages\NUnit.Runners.2.6.4\tools\lib\nunit-console-runner.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Mac">
|
||||
<HintPath>\Library\Frameworks\Xamarin.Mac.framework\Versions\Current\lib\x86_64\full\Xamarin.Mac.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Mac" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MacTestRunner\Main.cs" />
|
||||
<Compile Include="Tests\**\*.cs" />
|
||||
<Compile Include="Tests\DrawingTestsBase.cs" />
|
||||
<Compile Include="Tests\NinePatchTests.cs" />
|
||||
<Compile Include="Tests\ScrollableWidgetTests.cs" />
|
||||
<Compile Include="MacTestRunner\MacInit.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -94,7 +89,7 @@
|
|||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Xwt\Xwt.csproj">
|
||||
<Project>{92494904-35FA-4DC9-BDE9-3A3E87AC49D3}</Project>
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
using Xwt;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.IO;
|
||||
|
||||
namespace MacTest
|
||||
{
|
||||
|
@ -7,15 +10,14 @@ namespace MacTest
|
|||
{
|
||||
static int Main (string [] args)
|
||||
{
|
||||
//FIXME: remove this once mmp summorts xammac
|
||||
ObjCRuntime.Dlfcn.dlopen ("/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/libxammac.dylib", 0);
|
||||
|
||||
var list = new List<string> (args);
|
||||
var assemblyName = Path.GetFileName(typeof(MainClass).Assembly.Location);
|
||||
var list = new List<string> (args.Where (arg => !arg.StartsWith ("-psn_", System.StringComparison.Ordinal) && !arg.EndsWith(assemblyName, System.StringComparison.Ordinal)));
|
||||
list.Add ("-domain=None");
|
||||
list.Add ("-noshadow");
|
||||
list.Add ("-nothread");
|
||||
// if (!list.Contains (typeof (MainClass).Assembly.Location))
|
||||
// list.Add (typeof (MainClass).Assembly.Location);
|
||||
|
||||
if (!list.Contains (typeof (MainClass).Assembly.Location))
|
||||
list.Add (typeof (MainClass).Assembly.Location);
|
||||
|
||||
bool skipImageVerification = list.Remove ("-no-image-verify");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче