runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Need to copy xunit.runner.utility.desktop.dll in order to run performance tests

Open khdang opened this issue 10 years ago • 9 comments

For some reasons, l have to copy xunit.runner.utility.desktop.dll to run the perf test on CoreClr.

I have tried getting a new clone of corefx, do build.cmd and then run serialization performance tests, but I still see the complain that xunit.runner.utility.desktop.dll cannot be loaded.

e.g. I ran:

msbuild src\System.Runtime.Serialization.Xml\tests\System.Runtime.Serialization.Xml.Tests.csproj /t:rebuildandtest /p:Performance=true /p:Configuration=Windows_Release

I saw this error:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'xunit.runner.utility.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c' or one of its dependencies. The system cannot f
  ind the file specified.
     at Microsoft.Xunit.Performance.ProgramCore.Run(String[] args)
     at Microsoft.Xunit.Performance.Program.Main(String[] args)

If I copy corefx\packages\Microsoft.DotNet.xunit.performance.runner.Windows\1.0.0-alpha-build0029\tools\xunit.runner.utility.desktop.dll to dnxcore50 directory and run the msbuild command again it works fine. I'm wondering if I'm missing anything here.

khdang avatar Mar 22 '16 17:03 khdang

@dsgouda It looks like all the performance tests are broken from running manually. Do you know if this is related to dotnet/corefx#6972

davmason avatar Mar 22 '16 18:03 davmason

Having extreme network funkiness right now, but can you check whether your execution is in the context of corerun.exe? The only way this DLL should be necessary is if you're running against desktop Framework.

MattGal avatar Mar 22 '16 22:03 MattGal

It appears that the the test is run with a xunit.performance.run.exe command, which target is ".NETFramework,Version=v4.6". Any ideas how I can run performance test in CoreClr context?

e:\Open\corefx\bin/tests/Windows_NT.AnyCPU.Release/System.Runtime.Serialization.Json.Tests/dnxcore50/xunit.performance.run.exe System.Runtime.Serialization.Json.Tests.dll -trait Benchmark=true -runnerhost e:\Open\corefx\bin/tests/Windows_NT.AnyCPU.Release/System.Runtime.Serialization.Json.Tests/dnxcore50/CoreRun.exe -runner xunit.console.netcore.exe -runid System.Runtime.Serialization.Json.Tests.dll-WindowsCore -verbose

khdang avatar Mar 23 '16 19:03 khdang

The runner itself is a .NET Framework application, but the program being monitored (and perf information being gathered from) is a CoreCLR program:

-runnerhost e:\Open\corefx\bin/tests/Windows_NT.AnyCPU.Release/System.Runtime.Serialization.Json.Tests/dnxcore50/CoreRun.exe

-runner xunit.console.netcore.exe

mellinoe avatar Mar 23 '16 19:03 mellinoe

As for why xunit.runner.utility.desktop.dll needs to be copied over, from my memory I think it is because the "outer runner" (i.e. the .NET Framework application) needs to understand which tests are going to be run by the "inner runner" (the CoreCLR xunit runner), and it needs that xunit assembly to do the analysis.

mellinoe avatar Mar 23 '16 19:03 mellinoe

So should the xunit.runner.utility.desktop.dll be copied automatically to dnxcore50 folder? or this is only done in the lab machine and running on dev machine would require copying that file manually?

khdang avatar Mar 24 '16 17:03 khdang

Yes, it should be. This should have been happening automatically, perhaps something in buildtools has regressed it. It should be part of this target in buildtools.

mellinoe avatar Mar 24 '16 17:03 mellinoe

Thanks @mellinoe will take a look

dsgouda avatar Mar 24 '16 18:03 dsgouda

This should be resolved by a fix submitted here https://github.com/dotnet/buildtools/pull/591

dsgouda avatar Apr 05 '16 22:04 dsgouda