[Harness] Fix HML report for NUnitTestTasks. (#8367)

PR https://github.com/xamarin/xamarin-macios/pull/8184 removed the
inheritance with TextWriter, therefore the `as` will return null and we
will not generate the Html report. In this particular case, we do not
need an ILog, we just use it to get a path to the correct location,
therefore, we can create the file using the full path and pass it to the
xslt.

Fixes: https://github.com/xamarin/xamarin-macios/issues/8364
This commit is contained in:
Manuel de la Pena 2020-04-13 13:51:48 -04:00 коммит произвёл GitHub
Родитель 13fa3c96ab
Коммит 5e0131db27
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -141,7 +141,7 @@ namespace Xharness.Jenkins.TestTasks
using (var xri = XmlReader.Create (sri)) {
var xslt = new System.Xml.Xsl.XslCompiledTransform ();
xslt.Load (xrt);
using (var xwo = XmlWriter.Create (output as TextWriter, xslt.OutputSettings)) // use OutputSettings of xsl, so it can be output as HTML
using (var xwo = XmlWriter.Create (File.Create (output.FullPath), xslt.OutputSettings)) // use OutputSettings of xsl, so it can be output as HTML
{
xslt.Transform (xri, xwo);
}