diff --git a/.runsettings b/.runsettings
new file mode 100644
index 000000000..ca48342bd
--- /dev/null
+++ b/.runsettings
@@ -0,0 +1,7 @@
+
+
+
+
+ category!=failing
+
+
diff --git a/Directory.Build.props b/Directory.Build.props
index c4610d0ed..bb97810a8 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -15,6 +15,7 @@
$(MSBuildThisFileDirectory)artifacts/
$(SixLaborsProjectCategory)/$(MSBuildProjectName)
https://github.com/SixLabors/ImageSharp/
+ $(MSBuildThisFileDirectory)/.runsettings
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 4e7ab9e6b..2a7d25b97 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -18,22 +18,18 @@
-
+
-
+
-
-
+
diff --git a/ImageSharp.sln b/ImageSharp.sln
index 509dcf96b..b1d3176ad 100644
--- a/ImageSharp.sln
+++ b/ImageSharp.sln
@@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.gitattributes = .gitattributes
.gitignore = .gitignore
.gitmodules = .gitmodules
+ .runsettings = .runsettings
ci-build.ps1 = ci-build.ps1
ci-pack.ps1 = ci-pack.ps1
ci-test.ps1 = ci-test.ps1
diff --git a/tests/Directory.Build.targets b/tests/Directory.Build.targets
index ef67b122e..1f699c9dd 100644
--- a/tests/Directory.Build.targets
+++ b/tests/Directory.Build.targets
@@ -26,18 +26,19 @@
-
+
-
-
-
+
+
+
+
-
+
-
+
diff --git a/tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs
index 0c7c9a007..f98fa3c7f 100644
--- a/tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs
+++ b/tests/ImageSharp.Tests/Formats/Bmp/BmpDecoderTests.cs
@@ -39,22 +39,32 @@ namespace SixLabors.ImageSharp.Tests.Formats.Bmp
};
[Theory]
- [WithFileCollection(nameof(MiscBmpFiles), PixelTypes.Rgba32, false)]
- [WithFileCollection(nameof(MiscBmpFiles), PixelTypes.Rgba32, true)]
- public void BmpDecoder_CanDecode_MiscellaneousBitmaps(TestImageProvider provider, bool enforceDiscontiguousBuffers)
+ [WithFileCollection(nameof(MiscBmpFiles), PixelTypes.Rgba32)]
+ public void BmpDecoder_CanDecode_MiscellaneousBitmaps(TestImageProvider provider)
where TPixel : unmanaged, IPixel
+ {
+ using Image image = provider.GetImage(BmpDecoder);
+ image.DebugSave(provider);
+
+ if (TestEnvironment.IsWindows)
+ {
+ image.CompareToOriginal(provider);
+ }
+ }
+
+ [Theory]
+ [WithFileCollection(nameof(MiscBmpFiles), PixelTypes.Rgba32)]
+ public void BmpDecoder_CanDecode_MiscellaneousBitmaps_WithLimitedAllocatorBufferCapacity(
+ TestImageProvider provider)
{
static void RunTest(string providerDump, string nonContiguousBuffersStr)
{
- TestImageProvider provider = BasicSerializer.Deserialize>(providerDump);
+ TestImageProvider provider = BasicSerializer.Deserialize>(providerDump);
- if (!string.IsNullOrEmpty(nonContiguousBuffersStr))
- {
- provider.LimitAllocatorBufferCapacity().InPixelsSqrt(100);
- }
+ provider.LimitAllocatorBufferCapacity().InPixelsSqrt(100);
- using Image image = provider.GetImage(BmpDecoder);
- image.DebugSave(provider, testOutputDetails: nonContiguousBuffersStr);
+ using Image image = provider.GetImage(BmpDecoder);
+ image.DebugSave(provider, nonContiguousBuffersStr);
if (TestEnvironment.IsWindows)
{
@@ -66,7 +76,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Bmp
RemoteExecutor.Invoke(
RunTest,
providerDump,
- enforceDiscontiguousBuffers ? "Disco" : string.Empty)
+ "Disco")
.Dispose();
}
diff --git a/tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs
index 63aae5c55..eb2643b8c 100644
--- a/tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs
+++ b/tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs
@@ -198,17 +198,18 @@ namespace SixLabors.ImageSharp.Tests.Formats.Gif
[Theory]
[WithFile(TestImages.Gif.Giphy, PixelTypes.Rgba32)]
[WithFile(TestImages.Gif.Kumin, PixelTypes.Rgba32)]
- public void GifDecoder_CanDecode_WithLimitedAllocatorBufferCapacity(TestImageProvider provider)
- where TPixel : unmanaged, IPixel
+ public void GifDecoder_CanDecode_WithLimitedAllocatorBufferCapacity(
+ TestImageProvider provider)
{
static void RunTest(string providerDump, string nonContiguousBuffersStr)
{
- TestImageProvider provider = BasicSerializer.Deserialize>(providerDump);
+ TestImageProvider provider
+ = BasicSerializer.Deserialize>(providerDump);
provider.LimitAllocatorBufferCapacity().InPixelsSqrt(100);
- using Image image = provider.GetImage(GifDecoder);
- image.DebugSave(provider);
+ using Image image = provider.GetImage(GifDecoder);
+ image.DebugSave(provider, nonContiguousBuffersStr);
image.CompareToOriginal(provider);
}
diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Progressive.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Progressive.cs
index e29d8f158..98421ca5d 100644
--- a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Progressive.cs
+++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Progressive.cs
@@ -14,22 +14,32 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg
public const string DecodeProgressiveJpegOutputName = "DecodeProgressiveJpeg";
[Theory]
- [WithFileCollection(nameof(ProgressiveTestJpegs), PixelTypes.Rgba32, false)]
- [WithFile(TestImages.Jpeg.Progressive.Progress, PixelTypes.Rgba32, true)]
- public void DecodeProgressiveJpeg(TestImageProvider provider, bool enforceDiscontiguousBuffers)
+ [WithFileCollection(nameof(ProgressiveTestJpegs), PixelTypes.Rgba32)]
+ public void DecodeProgressiveJpeg(TestImageProvider provider)
where TPixel : unmanaged, IPixel
+ {
+ using Image image = provider.GetImage(JpegDecoder);
+ image.DebugSave(provider);
+
+ provider.Utility.TestName = DecodeProgressiveJpegOutputName;
+ image.CompareToReferenceOutput(
+ GetImageComparer(provider),
+ provider,
+ appendPixelTypeToFileName: false);
+ }
+
+ [Theory]
+ [WithFile(TestImages.Jpeg.Progressive.Progress, PixelTypes.Rgba32)]
+ public void DecodeProgressiveJpeg_WithLimitedAllocatorBufferCapacity(TestImageProvider provider)
{
static void RunTest(string providerDump, string nonContiguousBuffersStr)
{
- TestImageProvider provider =
- BasicSerializer.Deserialize>(providerDump);
+ TestImageProvider provider =
+ BasicSerializer.Deserialize>(providerDump);
- if (!string.IsNullOrEmpty(nonContiguousBuffersStr))
- {
- provider.LimitAllocatorBufferCapacity().InBytesSqrt(200);
- }
+ provider.LimitAllocatorBufferCapacity().InBytesSqrt(200);
- using Image image = provider.GetImage(JpegDecoder);
+ using Image image = provider.GetImage(JpegDecoder);
image.DebugSave(provider, nonContiguousBuffersStr);
provider.Utility.TestName = DecodeProgressiveJpegOutputName;
@@ -44,8 +54,8 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg
RemoteExecutor.Invoke(
RunTest,
providerDump,
- enforceDiscontiguousBuffers ? "Disco" : string.Empty)
- .Dispose();
+ "Disco")
+ .Dispose();
}
}
}
diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs
index 78218aec9..088421549 100644
--- a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs
+++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs
@@ -129,10 +129,10 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg
[Theory]
[InlineData(TestImages.Jpeg.Baseline.Jpeg420Small, 0)]
[InlineData(TestImages.Jpeg.Issues.ExifGetString750Transform, 1)]
- [InlineData(TestImages.Jpeg.Issues.ExifGetString750Transform, 10)]
+ [InlineData(TestImages.Jpeg.Issues.ExifGetString750Transform, 15)]
[InlineData(TestImages.Jpeg.Issues.ExifGetString750Transform, 30)]
[InlineData(TestImages.Jpeg.Issues.BadRstProgressive518, 1)]
- [InlineData(TestImages.Jpeg.Issues.BadRstProgressive518, 10)]
+ [InlineData(TestImages.Jpeg.Issues.BadRstProgressive518, 15)]
[InlineData(TestImages.Jpeg.Issues.BadRstProgressive518, 30)]
public async Task Decode_IsCancellable(string fileName, int cancellationDelayMs)
{
diff --git a/tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs
index 5b6adfe1a..2164975df 100644
--- a/tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs
+++ b/tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs
@@ -404,16 +404,15 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png
[Theory]
[WithFile(TestImages.Png.Splash, PixelTypes.Rgba32)]
[WithFile(TestImages.Png.Bike, PixelTypes.Rgba32)]
- public void PngDecoder_CanDecode_WithLimitedAllocatorBufferCapacity(TestImageProvider provider)
- where TPixel : unmanaged, IPixel
+ public void PngDecoder_CanDecode_WithLimitedAllocatorBufferCapacity(TestImageProvider provider)
{
static void RunTest(string providerDump, string nonContiguousBuffersStr)
{
- TestImageProvider provider = BasicSerializer.Deserialize>(providerDump);
+ TestImageProvider provider = BasicSerializer.Deserialize>(providerDump);
provider.LimitAllocatorBufferCapacity().InPixelsSqrt(100);
- using Image image = provider.GetImage(PngDecoder);
+ using Image image = provider.GetImage(PngDecoder);
image.DebugSave(provider, testOutputDetails: nonContiguousBuffersStr);
image.CompareToOriginal(provider);
}
diff --git a/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs b/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs
index b9f5f16fa..b35e55887 100644
--- a/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs
+++ b/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs
@@ -536,13 +536,12 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png
[Theory]
[WithTestPatternImages(100, 100, PixelTypes.Rgba32)]
- public void EncodeWorksWithoutSsse3Intrinsics(TestImageProvider provider)
- where TPixel : unmanaged, IPixel
+ public void EncodeWorksWithoutSsse3Intrinsics(TestImageProvider provider)
{
static void RunTest(string providerDump)
{
- TestImageProvider provider =
- BasicSerializer.Deserialize>(providerDump);
+ TestImageProvider provider =
+ BasicSerializer.Deserialize>(providerDump);
#if SUPPORTS_RUNTIME_INTRINSICS
Assert.False(Ssse3.IsSupported);
#endif
diff --git a/tests/ImageSharp.Tests/Formats/Tga/TgaDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Tga/TgaDecoderTests.cs
index 5fb15541e..edb43aa12 100644
--- a/tests/ImageSharp.Tests/Formats/Tga/TgaDecoderTests.cs
+++ b/tests/ImageSharp.Tests/Formats/Tga/TgaDecoderTests.cs
@@ -747,16 +747,15 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tga
[Theory]
[WithFile(Bit24BottomLeft, PixelTypes.Rgba32)]
[WithFile(Bit32BottomLeft, PixelTypes.Rgba32)]
- public void TgaDecoder_CanDecode_WithLimitedAllocatorBufferCapacity(TestImageProvider provider)
- where TPixel : unmanaged, IPixel
+ public void TgaDecoder_CanDecode_WithLimitedAllocatorBufferCapacity(TestImageProvider provider)
{
static void RunTest(string providerDump, string nonContiguousBuffersStr)
{
- TestImageProvider provider = BasicSerializer.Deserialize>(providerDump);
+ TestImageProvider provider = BasicSerializer.Deserialize>(providerDump);
provider.LimitAllocatorBufferCapacity().InPixelsSqrt(100);
- using Image image = provider.GetImage(TgaDecoder);
+ using Image image = provider.GetImage(TgaDecoder);
image.DebugSave(provider, testOutputDetails: nonContiguousBuffersStr);
if (TestEnvironment.IsWindows)
diff --git a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj
index ba849ab25..07ade97d5 100644
--- a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj
+++ b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj
@@ -20,6 +20,7 @@
+
diff --git a/tests/ImageSharp.Tests/Processing/Processors/Convolution/BokehBlurTest.cs b/tests/ImageSharp.Tests/Processing/Processors/Convolution/BokehBlurTest.cs
index 50b8782e4..6c48cf843 100644
--- a/tests/ImageSharp.Tests/Processing/Processors/Convolution/BokehBlurTest.cs
+++ b/tests/ImageSharp.Tests/Processing/Processors/Convolution/BokehBlurTest.cs
@@ -138,21 +138,10 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Convolution
public void BokehBlurFilterProcessor(TestImageProvider provider, BokehBlurInfo value)
where TPixel : unmanaged, IPixel
{
- static void RunTest(string providerDump, string infoDump)
- {
- TestImageProvider provider =
- BasicSerializer.Deserialize>(providerDump);
- BokehBlurInfo value = BasicSerializer.Deserialize(infoDump);
-
- provider.RunValidatingProcessorTest(
- x => x.BokehBlur(value.Radius, value.Components, value.Gamma),
- testOutputDetails: value.ToString(),
- appendPixelTypeToFileName: false);
- }
-
- RemoteExecutor
- .Invoke(RunTest, BasicSerializer.Serialize(provider), BasicSerializer.Serialize(value))
- .Dispose();
+ provider.RunValidatingProcessorTest(
+ x => x.BokehBlur(value.Radius, value.Components, value.Gamma),
+ testOutputDetails: value.ToString(),
+ appendPixelTypeToFileName: false);
}
[Theory]
@@ -164,18 +153,9 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Convolution
public void BokehBlurFilterProcessor_WorksWithAllPixelTypes(TestImageProvider provider)
where TPixel : unmanaged, IPixel
{
- static void RunTest(string providerDump)
- {
- TestImageProvider provider =
- BasicSerializer.Deserialize>(providerDump);
- provider.RunValidatingProcessorTest(
+ provider.RunValidatingProcessorTest(
x => x.BokehBlur(8, 2, 3),
appendSourceFileOrDescription: false);
- }
-
- RemoteExecutor
- .Invoke(RunTest, BasicSerializer.Serialize(provider))
- .Dispose();
}
[Theory]
@@ -183,26 +163,15 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Convolution
public void BokehBlurFilterProcessor_Bounded(TestImageProvider provider, BokehBlurInfo value)
where TPixel : unmanaged, IPixel
{
- static void RunTest(string providerDump, string infoDump)
- {
- TestImageProvider provider =
- BasicSerializer.Deserialize>(providerDump);
- BokehBlurInfo value = BasicSerializer.Deserialize(infoDump);
-
- provider.RunValidatingProcessorTest(
- x =>
- {
- Size size = x.GetCurrentSize();
- var bounds = new Rectangle(10, 10, size.Width / 2, size.Height / 2);
- x.BokehBlur(value.Radius, value.Components, value.Gamma, bounds);
- },
- testOutputDetails: value.ToString(),
- appendPixelTypeToFileName: false);
- }
-
- RemoteExecutor
- .Invoke(RunTest, BasicSerializer.Serialize(provider), BasicSerializer.Serialize(value))
- .Dispose();
+ provider.RunValidatingProcessorTest(
+ x =>
+ {
+ Size size = x.GetCurrentSize();
+ var bounds = new Rectangle(10, 10, size.Width / 2, size.Height / 2);
+ x.BokehBlur(value.Radius, value.Components, value.Gamma, bounds);
+ },
+ testOutputDetails: value.ToString(),
+ appendPixelTypeToFileName: false);
}
[Theory]
diff --git a/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs b/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs
index 1375b5763..48728faf0 100644
--- a/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs
+++ b/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.cs
@@ -170,7 +170,10 @@ namespace SixLabors.ImageSharp.Tests
}
string testProjectConfigPath = TestAssemblyFile.FullName + ".config";
- File.Copy(testProjectConfigPath, remoteExecutorConfigPath);
+ if (File.Exists(testProjectConfigPath))
+ {
+ File.Copy(testProjectConfigPath, remoteExecutorConfigPath);
+ }
if (Is64BitProcess)
{
diff --git a/tests/coverlet.runsettings b/tests/coverlet.runsettings
index ee408a5f0..cffce3540 100644
--- a/tests/coverlet.runsettings
+++ b/tests/coverlet.runsettings
@@ -1,5 +1,9 @@
+
+
+ category!=failing
+