From 73cbb4f49bb22f01b405fe600f331c91d583f876 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Thu, 12 Feb 2015 13:49:53 -0800 Subject: [PATCH] Spit out Xunit xml result files Spit out the xunit result files, as well as make the directory for the xunit html result files consistent with the result of the logs. We should also be passing the include and exclude attributes to the xunit task --- tests/runtest.cmd | 16 ++++++++-------- tests/tests.targets | 23 +++++++++-------------- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/tests/runtest.cmd b/tests/runtest.cmd index 889b3c073fcc..ddcf9731d056 100644 --- a/tests/runtest.cmd +++ b/tests/runtest.cmd @@ -58,7 +58,8 @@ if not exist %__LogsDir% md %__LogsDir% :SkipDefaultCoreRootSetup set __XunitWrapperBuildLog=%__LogsDir%\Tests_XunitWrapper_%__BuildArch%__%__BuildType%.log set __TestRunBuildLog=%__LogsDir%\TestRunResults_%__BuildArch%__%__BuildType%.log -set __TestRunHtmlLog=%CD%\TestRun_%__BuildArch%_%__BuildType%.html +set __TestRunHtmlLog=%__LogsDir%\TestRun_%__BuildArch%_%__BuildType%.html +set __TestRunXmlLog=%__LogsDir%\TestRun_%__BuildArch%_%__BuildType%.xml echo "Core_Root that will be used is : %Core_Root%" echo "Starting The Test Run .. " @@ -109,7 +110,12 @@ md %Core_Root% xcopy /s %__BinDir% %Core_Root% call :runtests -IF %BUILDERRORLEVEL% NEQ 0 echo Test Run failed. Refer %__TestRunBuildLog% for details. && exit /b %BUILDERRORLEVEL% +IF %BUILDERRORLEVEL% NEQ 0 ( + echo Test Run failed. Refer to the following" + echo Msbuild log: %__TestRunBuildLog% + echo Html report: %__TestRunHtmlLog% + exit /b %BUILDERRORLEVEL% +) goto :eof :runtests @@ -118,12 +124,6 @@ goto :eof set BUILDERRORLEVEL=%ERRORLEVEL% goto :eof -%_buildprefix% echo "Core_Root that was used is %Core_Root%" %_buildpostfix% -echo "Find details of the run in %__TestRunHtmlLog% - - -goto :eof - :Usage echo. echo Usage: diff --git a/tests/tests.targets b/tests/tests.targets index 092302963754..7fd0696602f1 100644 --- a/tests/tests.targets +++ b/tests/tests.targets @@ -10,6 +10,7 @@ $(BaseOutputPathWithConfig)\tests\XunitRunner\ <__TestRunHtmlLog Condition="'$(__TestRunHtmlLog)' == ''">$(__LogsDir)\TestRun.html + <__TestRunXmlLog Condition="'$(__TestRunXmlLog)' == ''">$(__LogsDir)\TestRun.xml @@ -46,21 +47,15 @@ - - - $(XunitOptions)-trait @(IncludeTraitsItems, ' -trait ') - $(XunitOptions)-notrait @(ExcludeTraitsItems, ' -notrait ') - $(XunitOptions) -parallel all - True - True - - +