Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,9 @@ public async Task CollectDeviceResult (Task<ProcessExecutionResult> 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;
Expand Down