diff --git a/build.cake b/build.cake index 4b199e9a..f9b319ca 100644 --- a/build.cake +++ b/build.cake @@ -14,8 +14,7 @@ var NuGetSources = new [] { MakeAbsolute (Directory ("./output")).FullPath, "htt var NugetToolPath = GetToolPath ("nuget.exe"); var XamarinComponentToolPath = GetToolPath ("xamarin-component.exe"); var CakeToolPath = GetToolPath ("Cake/Cake.exe"); -var TestConsoleToolPath_x86 = GetToolPath ("xunit.runner.console/tools/xunit.console.x86.exe"); -var TestConsoleToolPath_x64 = GetToolPath ("xunit.runner.console/tools/xunit.console.exe"); +var NUnitConsoleToolPath = GetToolPath ("NUnit.Console/tools/nunit3-console.exe"); var GenApiToolPath = GetToolPath ("Microsoft.DotNet.BuildTools.GenAPI/tools/GenAPI.exe"); var MDocPath = GetToolPath ("mdoc/mdoc.exe"); @@ -217,19 +216,19 @@ Task ("tests") c.Configuration = "Release"; c.Properties ["Platform"] = new [] { "x86" }; }); - RunTests("./tests/SkiaSharp.Desktop.Tests/bin/x86/Release/SkiaSharp.Desktop.Tests.dll", false); + RunTests("./tests/SkiaSharp.Desktop.Tests/bin/x86/Release/SkiaSharp.Desktop.Tests.dll"); DotNetBuild ("./tests/SkiaSharp.Desktop.Tests/SkiaSharp.Desktop.Tests.sln", c => { c.Configuration = "Release"; c.Properties ["Platform"] = new [] { "x64" }; }); - RunTests("./tests/SkiaSharp.Desktop.Tests/bin/x64/Release/SkiaSharp.Desktop.Tests.dll", true); + RunTests("./tests/SkiaSharp.Desktop.Tests/bin/x64/Release/SkiaSharp.Desktop.Tests.dll"); } // Mac OSX (Any CPU) if (IsRunningOnMac ()) { DotNetBuild ("./tests/SkiaSharp.Desktop.Tests/SkiaSharp.Desktop.Tests.sln", c => { c.Configuration = "Release"; }); - RunTests("./tests/SkiaSharp.Desktop.Tests/bin/AnyCPU/Release/SkiaSharp.Desktop.Tests.dll", false); + RunTests("./tests/SkiaSharp.Desktop.Tests/bin/AnyCPU/Release/SkiaSharp.Desktop.Tests.dll"); } // .NET Core RunDotNetCoreRestore ("./tests/SkiaSharp.NetCore.Tests"); @@ -664,8 +663,7 @@ Task ("Windows-CI") //////////////////////////////////////////////////////////////////////////////////////////////////// Information ("Cake.exe ToolPath: {0}", CakeToolPath); -Information ("Cake.exe TestConsoleToolPath_x86: {0}", TestConsoleToolPath_x86); -Information ("Cake.exe TestConsoleToolPath_x64: {0}", TestConsoleToolPath_x64); +Information ("Cake.exe NUnitConsoleToolPath: {0}", NUnitConsoleToolPath); Information ("NuGet.exe ToolPath: {0}", NugetToolPath); Information ("Xamarin-Component.exe ToolPath: {0}", XamarinComponentToolPath); Information ("genapi.exe ToolPath: {0}", GenApiToolPath); diff --git a/cake/UtilsManaged.cake b/cake/UtilsManaged.cake index 78bf3fab..101e212d 100644 --- a/cake/UtilsManaged.cake +++ b/cake/UtilsManaged.cake @@ -39,11 +39,11 @@ var RunProcess = new Action ((process, settings) => } }); -var RunTests = new Action ((testAssembly, is64) => +var RunTests = new Action ((testAssembly) => { var dir = testAssembly.GetDirectory (); - RunProcess (is64 ? TestConsoleToolPath_x64 : TestConsoleToolPath_x86, new ProcessSettings { - Arguments = string.Format ("\"{0}\"", testAssembly), + RunProcess (NUnitConsoleToolPath, new ProcessSettings { + Arguments = string.Format ("\"{0}\" --work=\"{1}\"", testAssembly, dir), }); }); diff --git a/tests/SkiaSharp.Desktop.Tests/SkiaSharp.Desktop.Tests.csproj b/tests/SkiaSharp.Desktop.Tests/SkiaSharp.Desktop.Tests.csproj index 4f70b09b..5aff5b90 100644 --- a/tests/SkiaSharp.Desktop.Tests/SkiaSharp.Desktop.Tests.csproj +++ b/tests/SkiaSharp.Desktop.Tests/SkiaSharp.Desktop.Tests.csproj @@ -1,6 +1,5 @@  - Debug @@ -74,6 +73,10 @@ true + + packages\NUnit.3.6.0\lib\net45\nunit.framework.dll + True + @@ -83,22 +86,6 @@ - - packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll - True - - - packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll - True - - - packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll - True - - - packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll - True - @@ -285,12 +272,6 @@ - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - -