Unit tests fail only when run via gitlab-runner

So basically I have unit tests that run a test of an app that uses D3D11

When I run the tests from inside visual studio the tests pass.

When I run the tests from the command line manually, the tests pass.

When gitlab-runner runs the tests. The tests fail. And I have determined that it fails at the point that it actually creates the D3D11 Device / Context.

The gitlab runner executes the exact same command that works when run manually. So I am pretty confused. It seems like something about being launched via gitlab-runner is making it not work. Any ideas? and thanks in advance.

UPDATE: I think that this may be a gitlab-bug or something, but I am new to CI so forgive me. Basically when I run gitlab-runner in debug/verbose mode. The test that didn’t work in regular mode worked perfectly, with results exactly as expected. Initializing D3D11 and rendering empty blue frames. Any insight?

I have the same problem using In Memory Database In ASP.NET Core. Would be glad to know, if someone knows where the problem is :confused: