[xharness] Don't try to write cleaned xml into the same file as the dirty xml was. (#9122)

This commit is contained in:
Rolf Bjarne Kvinge 2020-07-20 10:20:33 +02:00 коммит произвёл GitHub
Родитель 4f78e8c51b
Коммит 64bc5ea6eb
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -292,6 +292,8 @@ namespace Microsoft.DotNet.XHarness.iOS.Shared {
// 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)) {