From 74ecb1648cae27b9e53b7ab55b272192d3a1423d Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 31 Jul 2020 19:32:33 +0200 Subject: [PATCH] [xharness] Don't try to parse a build log that doesn't exist. (#9253) --- tests/xharness/TestTasks/RunTest.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/xharness/TestTasks/RunTest.cs b/tests/xharness/TestTasks/RunTest.cs index fb5bbe7bc487..efdaabe5d179 100644 --- a/tests/xharness/TestTasks/RunTest.cs +++ b/tests/xharness/TestTasks/RunTest.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Threading.Tasks; using Microsoft.DotNet.XHarness.iOS.Shared; using Microsoft.DotNet.XHarness.iOS.Shared.Execution; @@ -67,7 +68,7 @@ public async Task BuildAsync () testTask.FailureMessage = BuildTask.FailureMessage; if (BuildTask.KnownFailure.HasValue) testTask.KnownFailure = BuildTask.KnownFailure; - if (generateXmlFailures && BuildTask.BuildLog != null) { + if (generateXmlFailures && BuildTask.BuildLog != null && File.Exists (BuildTask.BuildLog.FullPath)) { var logReader = BuildTask.BuildLog.GetReader (); ResultParser.GenerateFailure ( logs: testTask.Logs,