зеркало из https://github.com/mono/SkiaSharp.git
Updated the .NET Core testing framework
This commit is contained in:
Родитель
d4680ed529
Коммит
39cb90b494
|
@ -132,7 +132,7 @@ Task ("tests")
|
|||
} else {
|
||||
RunMSBuildWithPlatform ("./tests/SkiaSharp.Desktop.Tests/SkiaSharp.Desktop.Tests.sln", arch);
|
||||
}
|
||||
RunTests ($"./tests/SkiaSharp.Desktop.Tests/bin/{arch}/Release/SkiaSharp.Tests.dll", null, arch == "x86");
|
||||
RunTests ($"./tests/SkiaSharp.Desktop.Tests/bin/{arch}/Release/SkiaSharp.Tests.dll", arch == "x86");
|
||||
CopyFileToDirectory ($"./tests/SkiaSharp.Desktop.Tests/bin/{arch}/Release/TestResult.xml", $"./output/tests/{platform}/{arch}");
|
||||
});
|
||||
|
||||
|
@ -173,8 +173,8 @@ Task ("tests")
|
|||
CleanDirectories ("./tests/packages/harfbuzzsharp*");
|
||||
EnsureDirectoryExists ("./output/tests/netcore");
|
||||
RunMSBuildRestoreLocal (netCoreTestProj, "./tests/packages");
|
||||
RunNetCoreTests (netCoreTestProj, null);
|
||||
CopyFileToDirectory ("./tests/SkiaSharp.NetCore.Tests/TestResult.xml", "./output/tests/netcore");
|
||||
RunNetCoreTests (netCoreTestProj);
|
||||
CopyFile ("./tests/SkiaSharp.NetCore.Tests/TestResults/TestResults.xml", "./output/tests/netcore/TestResult.xml");
|
||||
});
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -85,7 +85,7 @@ var RunProcess = new Action<FilePath, ProcessSettings> ((process, settings) =>
|
|||
}
|
||||
});
|
||||
|
||||
var RunTests = new Action<FilePath, string[], bool> ((testAssembly, skip, is32) =>
|
||||
var RunTests = new Action<FilePath, bool> ((testAssembly, is32) =>
|
||||
{
|
||||
var dir = testAssembly.GetDirectory ();
|
||||
var settings = new XUnit2Settings {
|
||||
|
@ -97,22 +97,17 @@ var RunTests = new Action<FilePath, string[], bool> ((testAssembly, skip, is32)
|
|||
WorkingDirectory = dir,
|
||||
ArgumentCustomization = args => args.Append ("-verbose"),
|
||||
};
|
||||
if (skip != null) {
|
||||
settings.TraitsToExclude.Add ("Category", skip);
|
||||
}
|
||||
XUnit2 (new [] { testAssembly }, settings);
|
||||
});
|
||||
|
||||
var RunNetCoreTests = new Action<FilePath, string[]> ((testAssembly, skip) =>
|
||||
var RunNetCoreTests = new Action<FilePath> ((testAssembly) =>
|
||||
{
|
||||
var dir = testAssembly.GetDirectory ();
|
||||
string skipString = "";
|
||||
if (skip != null) {
|
||||
foreach (var s in skip) {
|
||||
skipString += $" -notrait \"Category={skip}\"";
|
||||
}
|
||||
}
|
||||
DotNetCoreTool(testAssembly, "xunit", $"-verbose -parallel none -xml \"TestResult.xml\" {skipString}", new DotNetCoreToolSettings {
|
||||
DotNetCoreTest(testAssembly.GetFilename().ToString(), new DotNetCoreTestSettings {
|
||||
Configuration = "Release",
|
||||
NoRestore = true,
|
||||
TestAdapterPath = ".",
|
||||
Logger = "xunit",
|
||||
WorkingDirectory = dir,
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,7 +9,7 @@ import groovy.transform.Field
|
|||
@Field def minimalLinuxPackages = "curl mono-complete msbuild"
|
||||
@Field def nativeLinuxPackages = "python git libfontconfig1-dev"
|
||||
@Field def nativeTizenPackages = "python git openjdk-8-jdk zip libxcb-xfixes0 libxcb-render-util0 libwebkitgtk-1.0-0 libxcb-image0 acl libsdl1.2debian libv4l-0 libxcb-randr0 libxcb-shape0 libxcb-icccm4 libsm6 gettext rpm2cpio cpio bridge-utils openvpn"
|
||||
@Field def managedLinuxPackages = "dotnet-sdk-2.0.0 ttf-ancient-fonts"
|
||||
@Field def managedLinuxPackages = "dotnet-sdk-2.1 ttf-ancient-fonts"
|
||||
|
||||
@Field def nativeStashes = []
|
||||
@Field def managedStashes = []
|
||||
|
|
|
@ -2,16 +2,13 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\source\SkiaSharp.Build.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<DefineConstants>$(DefineConstants);NET_STANDARD</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>portable</DebugType>
|
||||
<RootNamespace>SkiaSharp.Tests</RootNamespace>
|
||||
<AssemblyName>SkiaSharp.Tests</AssemblyName>
|
||||
<PackageId>SkiaSharp.NetCore.Tests</PackageId>
|
||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.14.10-x64;ubuntu.16.04-x64;ubuntu.16.10-x64</RuntimeIdentifiers>
|
||||
<RuntimeFrameworkVersion>2.0.0</RuntimeFrameworkVersion>
|
||||
<SkipGenerateAssemblyVersionInfo>true</SkipGenerateAssemblyVersionInfo>
|
||||
<SkipMDocGenerateDocs>true</SkipMDocGenerateDocs>
|
||||
<SkipCopyToOutputDirectory>true</SkipCopyToOutputDirectory>
|
||||
|
@ -19,15 +16,13 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="xunit" Version="2.4.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
|
||||
<PackageReference Include="XunitXml.TestLogger" Version="2.0.0" />
|
||||
<PackageReference Include="SkiaSharp" Version="1.68.0" />
|
||||
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="1.68.0" />
|
||||
<PackageReference Include="HarfBuzzSharp" Version="1.4.6.2" />
|
||||
<PackageReference Include="HarfBuzzSharp.NativeAssets.Linux" Version="1.4.6.2" />
|
||||
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.68.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="dotnet-xunit" Version="2.4.0-beta.1.build3958" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Tests\**\*.cs" Link="%(RecursiveDir)%(FileName)%(Extension)" />
|
||||
</ItemGroup>
|
||||
|
|
Загрузка…
Ссылка в новой задаче