Why unitest for sharpdx fails on Jenkins but not localy and how can i fix it?

0

I have a couple off UnitTest which are running fine localy, but fail on my Jenkins-Server. All unit-test a failing with an similiar reason: SharpDX is unable to aquire resources.

 SetUp : SharpDX.SharpDXException : HRESULT: [0x887A0022], Module: [Unknown], ApiCode: [Unknown/Unknown], Message: A resource is not available at the time of the call. However, it may be available at a later date.
 +++++++++++++++++++
                                                STACK TRACE:
                                                at SharpDX.Result.CheckError()
at SharpDX.Direct2D1.Factory.CreateHwndRenderTarget(RenderTargetProperties& renderTargetProperties, HwndRenderTargetProperties& hwndRenderTargetProperties, WindowRenderTarget hwndRenderTarget)

My Jenkins(ver. 2.190.1) is running under the local system account. The error seems to be realted to that (No screen session). I tried the solution from the answers of @maQ at Jenkins on Windows and GUI Tests without RDC and running jenkin as a local user but without success.

unit-testing
jenkins
sharpdx

1 Answer

0

Have you tested running your code from command line or from IDE? If you have not tested your code locally from command line, you can test it.

Is your build node and local machine same? If not please verify that the sharpdx is installed in your build node.

If it is already tested and working and your build node is also configured with the sharpdx, adding the environment variable point to sharpdx home directory in jenkins slave's configuration should work. All the best !

answered on Stack Overflow Dec 16, 2019 by Hardik Rathod

User contributions licensed under CC BY-SA 3.0