[xharness] Don't replace existing files, instead add new files, when providing human-readable logs. (#9123)

This makes understanding what's going on much easier.
This commit is contained in:
Rolf Bjarne Kvinge 2020-07-20 10:27:07 +02:00 коммит произвёл GitHub
Родитель 64bc5ea6eb
Коммит ba7e73b5dd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 3 добавлений и 6 удалений

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

@ -320,12 +320,9 @@ namespace Microsoft.DotNet.XHarness.iOS.Shared {
}
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;