diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestReporter.cs b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestReporter.cs index 0aa218e18042..3d1a1f976922 100644 --- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestReporter.cs +++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestReporter.cs @@ -318,12 +318,9 @@ public async Task CollectDeviceResult (Task processExecu } path = newFilename; - // write the human readable results in a tmp file, which we later use to step on the logs - var tmpFile = Path.Combine (Path.GetTempPath (), Guid.NewGuid ().ToString ()); - (parseResult.resultLine, parseResult.failed) = resultParser.GenerateHumanReadableResults (path, tmpFile, xmlType); - File.Copy (tmpFile, test_log_path, true); - File.Delete (tmpFile); - + var humanReadableLog = logs.CreateFile (Path.GetFileNameWithoutExtension (test_log_path) + ".log", LogType.NUnitResult.ToString ()); + (parseResult.resultLine, parseResult.failed) = resultParser.GenerateHumanReadableResults (path, humanReadableLog, xmlType); + // we do not longer need the tmp file logs.AddFile (path, LogType.XmlLog.ToString ()); return parseResult;