From c612c3abb28481ae430acc79ff190f59fdbaffa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mille=20Bostr=C3=B6m?= Date: Wed, 15 Jan 2020 15:43:45 +0100 Subject: [PATCH] Added check for error message when running tests with dotnet. (#23) --- .../DotNet/DotNetTestRunner.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Testura.Mutation.TestRunner.Console/DotNet/DotNetTestRunner.cs b/src/Testura.Mutation.TestRunner.Console/DotNet/DotNetTestRunner.cs index 48cf457..1c1bb58 100644 --- a/src/Testura.Mutation.TestRunner.Console/DotNet/DotNetTestRunner.cs +++ b/src/Testura.Mutation.TestRunner.Console/DotNet/DotNetTestRunner.cs @@ -62,7 +62,7 @@ public Task RunTestWithRetries(string dllPath, int retries) ReadToEnd(command.StandardOutput, cancellationToken, out var message); var resultFile = GetResultFile(directoryPath); - var success = !string.IsNullOrEmpty(resultFile); + var success = !string.IsNullOrEmpty(resultFile) && (string.IsNullOrEmpty(error) || error == "Test Run Failed."); if (!success) {