diff --git a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestReporter.cs b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestReporter.cs index 0aa218e18042..7ae0fb8ef5b6 100644 --- a/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestReporter.cs +++ b/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/TestReporter.cs @@ -292,6 +292,8 @@ public async Task CollectDeviceResult (Task processExecu // from the TCP connection, we are going to fail when trying to read it and not parse it. Therefore, we are not only // going to check if we are in CI, but also if the listener_log is valid. var path = Path.ChangeExtension (test_log_path, "xml"); + if (path == test_log_path) + path = Path.Combine (Path.GetDirectoryName (path), Path.GetFileNameWithoutExtension (path) + "-clean.xml"); resultParser.CleanXml (test_log_path, path); if (ResultsUseXml && resultParser.IsValidXml (path, out var xmlType)) {