Skip to content

Commit 6f20d94

Browse files
Merge pull request #2175 from SixLabors/js/test-environment-info
Print environment info on tests start
2 parents 75dc96a + 5cd294e commit 6f20d94

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

tests/ImageSharp.Tests/ImageSharp.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
</ItemGroup>
3636

3737
<ItemGroup>
38+
<PackageReference Include="BenchmarkDotNet" />
3839
<PackageReference Include="Magick.NET-Q16-AnyCPU" />
3940
<PackageReference Include="Microsoft.DotNet.RemoteExecutor" />
4041
<PackageReference Include="Microsoft.DotNet.XUnitExtensions" />
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright (c) Six Labors.
2+
// Licensed under the Apache License, Version 2.0.
3+
4+
using BenchmarkDotNet.Environments;
5+
using SixLabors.ImageSharp.Tests.TestUtilities;
6+
using Xunit.Abstractions;
7+
using Xunit.Sdk;
8+
9+
[assembly: Xunit.TestFramework(SixLaborsXunitTestFramework.Type, SixLaborsXunitTestFramework.Assembly)]
10+
11+
namespace SixLabors.ImageSharp.Tests.TestUtilities
12+
{
13+
public class SixLaborsXunitTestFramework : XunitTestFramework
14+
{
15+
public const string Type = "SixLabors.ImageSharp.Tests.TestUtilities.SixLaborsXunitTestFramework";
16+
public const string Assembly = "SixLabors.ImageSharp.Tests";
17+
18+
public SixLaborsXunitTestFramework(IMessageSink messageSink)
19+
: base(messageSink)
20+
{
21+
var message = new DiagnosticMessage(HostEnvironmentInfo.GetInformation());
22+
messageSink.OnMessage(message);
23+
}
24+
}
25+
}

0 commit comments

Comments
 (0)